| #!/usr/bin/env groovy |
| //------------------------------------------------------------------------------- |
| // Copyright (c) 2020-2024, Arm Limited and Contributors. All rights reserved. |
| // |
| // SPDX-License-Identifier: BSD-3-Clause |
| // |
| //------------------------------------------------------------------------------- |
| |
| @Library('trustedfirmware') _ |
| import org.trustedfirmware.Gerrit |
| |
| timestamps { |
| node("docker-amd64-tf-m-jammy") { |
| // Clone TF-M repositories so share folder can be reused by downstream jobs |
| stage("Init") { |
| cleanWs() |
| dir("tf-m-ci-scripts") { |
| tfgit.checkout_ci_scripts() |
| sh "./clone.sh" |
| } |
| } |
| stage("Check") { |
| def verify = 1 |
| try { |
| sh """ |
| cd trusted-firmware-m |
| ../tf-m-ci-scripts/run-checkpatch.sh -r -l 1 |
| """ |
| } catch (Exception e) { |
| manager.buildFailure() |
| verify = -1 |
| } finally { |
| g = new Gerrit() |
| g.verifyStatusInWorkspace(verify, 'checkpatch', 'static') |
| def buildStatus = (verify == 1) ? 'Successful' : 'Failed' |
| //g.commentInWorkspace("Build checkpatch ${buildStatus}: ${env.RUN_DISPLAY_URL}") |
| cleanWs() |
| } |
| } |
| } |
| } |