Leonardo Sandoval | 2d207d0 | 2020-08-05 13:54:52 -0500 | [diff] [blame] | 1 | #!/usr/bin/env groovy |
| 2 | //------------------------------------------------------------------------------- |
Paul Sokolovsky | e1ad477 | 2024-03-07 00:08:27 +0700 | [diff] [blame] | 3 | // Copyright (c) 2020-2024, Arm Limited and Contributors. All rights reserved. |
Leonardo Sandoval | 2d207d0 | 2020-08-05 13:54:52 -0500 | [diff] [blame] | 4 | // |
| 5 | // SPDX-License-Identifier: BSD-3-Clause |
| 6 | // |
| 7 | //------------------------------------------------------------------------------- |
| 8 | |
| 9 | @Library('trustedfirmware') _ |
| 10 | import org.trustedfirmware.Gerrit |
| 11 | |
Xinyu Zhang | 4cdfd1b | 2021-05-21 15:10:49 +0800 | [diff] [blame] | 12 | timestamps { |
Paul Sokolovsky | e1ad477 | 2024-03-07 00:08:27 +0700 | [diff] [blame] | 13 | node("docker-amd64-tf-m-jammy") { |
Xinyu Zhang | 4cdfd1b | 2021-05-21 15:10:49 +0800 | [diff] [blame] | 14 | stage("Init") { |
Leonardo Sandoval | 2d207d0 | 2020-08-05 13:54:52 -0500 | [diff] [blame] | 15 | cleanWs() |
Xinyu Zhang | 4cdfd1b | 2021-05-21 15:10:49 +0800 | [diff] [blame] | 16 | dir("tf-m-ci-scripts") { |
| 17 | checkout([$class: 'GitSCM', branches: [[name: '$CI_SCRIPTS_BRANCH']], userRemoteConfigs: [[credentialsId: 'GIT_SSH_KEY', url: '$CI_SCRIPTS_REPO']]]) |
Leonardo Sandoval | 7090b2c | 2021-09-17 13:20:44 -0500 | [diff] [blame] | 18 | // Clone TF-M repositories so share folder can be reused by downstream jobs |
| 19 | sh "./clone.sh" |
Xinyu Zhang | 4cdfd1b | 2021-05-21 15:10:49 +0800 | [diff] [blame] | 20 | } |
| 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 Sandoval | 2d207d0 | 2020-08-05 13:54:52 -0500 | [diff] [blame] | 39 | } |
| 40 | } |
| 41 | } |