Various fixes
* Retrieve build commands from build_manager
* fixing psa build dir
* Use different node labels for different builds
* Add script to download jenkins artifacts
* Verify status per stage
* Moving code to library
* Ability to comment on gerrit change
Change-Id: I390674b7ed6cfd20e4746a2d32e708fd6855857b
Signed-off-by: Dean Birch <dean.birch@arm.com>
diff --git a/jenkins/checkpatch.jpl b/jenkins/checkpatch.jpl
index 5a447b5..7855cb0 100644
--- a/jenkins/checkpatch.jpl
+++ b/jenkins/checkpatch.jpl
@@ -6,22 +6,8 @@
//
//-------------------------------------------------------------------------------
-def verifyStatus(value, stage_name) {
- withCredentials([usernamePassword(credentialsId: 'VERIFY_STATUS', passwordVariable: 'VERIFY_PASSWORD', usernameVariable: 'VERIFY_USER')]) {
- sh """
-if [ -z "\$GERRIT_HOST" ] ; then
- echo Not running for a Gerrit change, skipping vote.
- exit 0
-fi
-if [ ! -d venv ] ; then
- virtualenv -p \$(which python3) venv
-fi
-. venv/bin/activate
-pip -q install requests
-./tf-m-ci-scripts/jenkins/verify.py --value ${value} --verify-name tf-m-${stage_name} --user \$VERIFY_USER
-"""
- }
-}
+@Library('trustedfirmware') _
+import org.trustedfirmware.Gerrit
node("docker-amd64-xenial") {
stage("Init") {
@@ -75,7 +61,8 @@
manager.buildFailure()
verify = -1
} finally {
- verifyStatus(verify, 'checkpatch')
+ g = new Gerrit()
+ g.verifyStatusInWorkspace(verify, 'checkpatch', 'static')
cleanWs()
}
}