blob: 0e32c5c62f09cc392b05e61e9aba67f1c8438f29 [file] [log] [blame]
Leonardo Sandoval2d207d02020-08-05 13:54:52 -05001#!/usr/bin/env groovy
2//-------------------------------------------------------------------------------
Paul Sokolovskye1ad4772024-03-07 00:08:27 +07003// Copyright (c) 2020-2024, Arm Limited and Contributors. All rights reserved.
Leonardo Sandoval2d207d02020-08-05 13:54:52 -05004//
5// SPDX-License-Identifier: BSD-3-Clause
6//
7//-------------------------------------------------------------------------------
8
9@Library('trustedfirmware') _
10import org.trustedfirmware.Gerrit
11
Xinyu Zhang4cdfd1b2021-05-21 15:10:49 +080012timestamps {
Paul Sokolovskye1ad4772024-03-07 00:08:27 +070013 node("docker-amd64-tf-m-jammy") {
Xinyu Zhang4cdfd1b2021-05-21 15:10:49 +080014 stage("Init") {
Leonardo Sandoval2d207d02020-08-05 13:54:52 -050015 cleanWs()
Xinyu Zhang4cdfd1b2021-05-21 15:10:49 +080016 dir("tf-m-ci-scripts") {
17 checkout([$class: 'GitSCM', branches: [[name: '$CI_SCRIPTS_BRANCH']], userRemoteConfigs: [[credentialsId: 'GIT_SSH_KEY', url: '$CI_SCRIPTS_REPO']]])
Leonardo Sandoval7090b2c2021-09-17 13:20:44 -050018 // Clone TF-M repositories so share folder can be reused by downstream jobs
19 sh "./clone.sh"
Xinyu Zhang4cdfd1b2021-05-21 15:10:49 +080020 }
21 }
22 stage("Check") {
23 def verify = 1
24 try {
25 sh """
26 cd trusted-firmware-m
27 IS_CONTINUOUS_INTEGRATION=1 ../tf-m-ci-scripts/run-static-checks.sh
28 """
29 } catch (Exception e) {
30 manager.buildFailure()
31 verify = -1
32 } finally {
33 g = new Gerrit()
34 g.verifyStatusInWorkspace(verify, 'static-checks', 'static')
35 def buildStatus = (verify == 1) ? 'Successful' : 'Failed'
36 //g.commentInWorkspace("Build checkpatch ${buildStatus}: ${env.RUN_DISPLAY_URL}")
37 cleanWs()
38 }
Leonardo Sandoval2d207d02020-08-05 13:54:52 -050039 }
40 }
41}