Skip to content

Commit

Permalink
[I/Y-build] Set 'pipefail' option instead of checking PIPESTATUS
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesWell committed Jan 21, 2025
1 parent a809de5 commit bb67269
Showing 1 changed file with 11 additions and 51 deletions.
62 changes: 11 additions & 51 deletions JenkinsJobs/Builds/build.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
'''
}
}
Expand All @@ -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
'''
}
}
Expand All @@ -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
'''
}
}
Expand All @@ -144,14 +132,10 @@ spec:
dir("${CJE_ROOT}/mbscripts") {
sshagent(['github-bot-ssh']) {
sh '''
set -eo pipefail
git config --global user.email "[email protected]"
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
'''
}
}
Expand All @@ -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
'''
}
}
Expand All @@ -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
'''
}
}
Expand All @@ -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
'''
}
}
Expand All @@ -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
'''
}
}
Expand All @@ -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
'''
}
}
Expand All @@ -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
'''
}
}
Expand Down

0 comments on commit bb67269

Please sign in to comment.