Jenkins: Only switch Nodes when necessary
Same node is switched in and out for several times in a single job,
which is actaully unnecessary and has a bad influence on the CI job
performance.
It is more reasonable to have all stages in one job to be processed in
one node.
Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
Change-Id: I938b539923ed3a63e273bf6f3cc565057884d96c
diff --git a/jenkins/ci.jpl b/jenkins/ci.jpl
index d9bdf16..f4c40e5 100644
--- a/jenkins/ci.jpl
+++ b/jenkins/ci.jpl
@@ -494,6 +494,7 @@
sh "./clone.sh"
}
}
+
stage("Configs") {
// Populate configs
listConfigs('tf-m-ci-scripts', configs, env.FILTER_GROUP)
@@ -506,31 +507,29 @@
builds["docs"] = buildDocs(results)
}
}
- }
- stage("Builds") {
- def verify = 1
- def success = true
- try {
- parallel(builds)
- } catch (Exception e) {
- print(e)
- manager.buildFailure()
- verify = -1
- success = false
- } finally {
- print("Verifying status")
- def failed_builds = filterFailedBuild(results['builds'])
- emailNotification(success, 'build', failed_builds)
- g = new Gerrit()
- g.verifyStatus(verify, 'tf-m-build', 'build')
- print("Building CSV")
- generateBuildCsv(results['builds'])
- writeSummary(results['builds'])
+ stage("Builds") {
+ def verify = 1
+ def success = true
+ try {
+ parallel(builds)
+ } catch (Exception e) {
+ print(e)
+ manager.buildFailure()
+ verify = -1
+ success = false
+ } finally {
+ print("Verifying status")
+ def failed_builds = filterFailedBuild(results['builds'])
+ emailNotification(success, 'build', failed_builds)
+ g = new Gerrit()
+ g.verifyStatus(verify, 'tf-m-build', 'build')
+ print("Building CSV")
+ generateBuildCsv(results['builds'])
+ writeSummary(results['builds'])
+ }
}
- }
- node("docker-amd64-tf-m-bionic") {
stage("Tests") {
dir("tf-m-ci-scripts") {
checkout([$class: 'GitSCM', branches: [[name: '$CI_SCRIPTS_BRANCH']], userRemoteConfigs: [[credentialsId: 'GIT_SSH_KEY', url: '$CI_SCRIPTS_REPO']]])
@@ -545,9 +544,9 @@
dir(".") {
withCredentials([usernamePassword(credentialsId: env.LAVA_CREDENTIALS, passwordVariable: 'LAVA_TOKEN', usernameVariable: 'LAVA_USER')]) {
output = sh(script: """./tf-m-ci-scripts/lava_helper/lava_wait_jobs.py --job-ids ${all_jobs.join(",")} \
- --lava-url ${env.LAVA_URL} --lava-user ${LAVA_USER} --lava-token ${LAVA_TOKEN} \
- --artifacts-path cfgs --lava-timeout 12000 \
- """, returnStdout: true).trim()
+ --lava-url ${env.LAVA_URL} --lava-user ${LAVA_USER} --lava-token ${LAVA_TOKEN} \
+ --artifacts-path cfgs --lava-timeout 12000 \
+ """, returnStdout: true).trim()
println("--- output from lava_wait_jobs.py ---")
println(output)
println("--- end of output from lava_wait_jobs.py ---")