diff --git a/JenkinsJobs/Builds/build.jenkinsfile b/JenkinsJobs/Builds/build.jenkinsfile index f180c5b4c0d..48536505b67 100644 --- a/JenkinsJobs/Builds/build.jenkinsfile +++ b/JenkinsJobs/Builds/build.jenkinsfile @@ -87,12 +87,8 @@ spec: steps { dir("${CJE_ROOT}/mbscripts") { sh ''' + set -eo pipefail ./mb010_createEnvfiles.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb010_createEnvfiles.sh.log - if [[ ${PIPESTATUS[0]} -ne 0 ]] - then - echo "Failed in Generate environment variables stage" - exit 1 - fi ''' } } @@ -112,12 +108,8 @@ spec: dir("${CJE_ROOT}/mbscripts") { sshagent(['projects-storage.eclipse.org-bot-ssh']) { sh ''' + set -eo pipefail ./mb020_createBaseBuilder.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb020_createBaseBuilder.sh.log - if [[ ${PIPESTATUS[0]} -ne 0 ]] - then - echo "Failed in Create Base builder stage" - exit 1 - fi ''' } } @@ -128,12 +120,8 @@ spec: dir("${CJE_ROOT}/mbscripts") { sshagent(['projects-storage.eclipse.org-bot-ssh']) { sh ''' + set -eo pipefail ./mb030_downloadBuildToCompare.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb030_downloadBuildToCompare.sh.log - if [[ ${PIPESTATUS[0]} -ne 0 ]] - then - echo "Failed in Download reference repo for repo reports stage" - exit 1 - fi ''' } } @@ -144,14 +132,10 @@ spec: dir("${CJE_ROOT}/mbscripts") { sshagent(['github-bot-ssh']) { sh ''' + set -eo pipefail git config --global user.email "eclipse-releng-bot@eclipse.org" git config --global user.name "Eclipse Releng Bot" ./mb100_cloneRepos.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb100_cloneRepos.sh.log - if [[ ${PIPESTATUS[0]} -ne 0 ]] - then - echo "Failed in Clone Repositories stage" - exit 1 - fi ''' } } @@ -165,12 +149,8 @@ spec: dir("${CJE_ROOT}/mbscripts") { sshagent (['github-bot-ssh', 'projects-storage.eclipse.org-bot-ssh']) { sh ''' - bash -x ./mb110_tagBuildInputs.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb110_tagBuildInputs.sh.log - if [[ ${PIPESTATUS[0]} -ne 0 ]] - then - echo "Failed in Tag Build Inputs stage" - exit 1 - fi + set -xeo pipefail + ./mb110_tagBuildInputs.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb110_tagBuildInputs.sh.log ''' } } @@ -196,12 +176,8 @@ spec: steps { dir("${CJE_ROOT}/mbscripts") { sh ''' + set -eo pipefail ./mb220_buildSdkPatch.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb220_buildSdkPatch.sh.log - if [[ ${PIPESTATUS[0]} -ne 0 ]] - then - echo "Failed in Aggregator maven build stage" - exit 1 - fi ''' } } @@ -214,12 +190,8 @@ spec: steps { dir("${CJE_ROOT}/mbscripts") { sh ''' + set -eo pipefail bash -x ./mb300_gatherEclipseParts.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb300_gatherEclipseParts.sh.log - if [[ ${PIPESTATUS[0]} -ne 0 ]] - then - echo "Failed in Gather Eclipse Parts stage" - exit 1 - fi ''' } } @@ -232,12 +204,8 @@ spec: steps { dir("${CJE_ROOT}/mbscripts") { sh ''' + set -eo pipefail ./mb310_gatherEquinoxParts.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb310_gatherEquinoxParts.sh.log - if [[ ${PIPESTATUS[0]} -ne 0 ]] - then - echo "Failed in Gather Equinox Parts stage" - exit 1 - fi ''' } } @@ -246,12 +214,8 @@ spec: steps { dir("${CJE_ROOT}/mbscripts") { sh ''' + set -eo pipefail ./mb500_createRepoReports.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb500_createRepoReports.sh.log - if [[ ${PIPESTATUS[0]} -ne 0 ]] - then - echo "Failed in Generate Repo reports stage" - exit 1 - fi ''' } } @@ -260,12 +224,8 @@ spec: steps { dir("${CJE_ROOT}/mbscripts") { sh ''' + set -eo pipefail ./mb510_createApiToolsReports.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb510_createApiToolsReports.sh.log - if [[ ${PIPESTATUS[0]} -ne 0 ]] - then - echo "Failed in Generate API tools reports stage" - exit 1 - fi ''' } }