From 74ef65ec337be29e1c8ef4beda6c239c850528f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Mattm=C3=BCller?= Date: Mon, 31 Jul 2023 17:12:51 +0200 Subject: [PATCH] jobs/buildAll: fixed small typo and enhanced stage status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc Mattmüller --- jobs/Jenkinsfile_BuildAll | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/jobs/Jenkinsfile_BuildAll b/jobs/Jenkinsfile_BuildAll index 83fd576..82b7779 100644 --- a/jobs/Jenkinsfile_BuildAll +++ b/jobs/Jenkinsfile_BuildAll @@ -76,14 +76,22 @@ pipeline { steps { script { def listOfTargets = getTargetsFromList() - + def isBuildSuccess = true + def firstMachineFailing = "" catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { for (machine in listOfTargets) { if(isMachineSane(machine)) { println "BUILDING ${machine}" - runBuildJob(common, machine, "${params.BUILD_BRANCH}") - } + def buildjob = runBuildJob(common, machine, "${params.BUILD_BRANCH}") + if((buildJob.getResult() != 'SUCCESS') && isBuildSuccess) { + isBuildSuccess = false + firstMachineFailing = machine + } + } // end isMachineSane } // end for + if(!isBuildSuccess) { + error("Build error, first machine failing = ${firstMachineFailing}") + } } // end catchError } } @@ -115,8 +123,8 @@ def checkJobParameters(commonHelpers) { //--------------------------------------------------------------------------------------------------------------------- def setDisplayName(commonHelpers) { def buildName = "#${env.BUILD_NUMBER}" - def postfix = icommonHelpers.sJobTriggeredByTimer() ? "-nightly" : "" - currentBuild.displayName = "${buildName}-${env.TARGET}${postfix}" + def postfix = commonHelpers.isJobTriggeredByTimer() ? "-nightly" : "" + currentBuild.displayName = "${buildName}${postfix}" } @@ -125,7 +133,7 @@ def setupEnvironment(commonHelpers) { def nwlBranch = "${params.BUILD_BRANCH}" def nwlRepoDir = "${env.YOCTO_REPO_DIR}" commonHelpers.gitCheckout("${env.YOCTO_REPO_URL}", nwlBranch, nwlRepoDir, true) - env.BUILD_IMG_JOB = "/build-target/${env.BRANCH_NAME}" + env.BUILD_IMG_JOB = "/build-yocto-target-pipeline/${env.BRANCH_NAME}" } //-----------------------------------------------------------------------------