Skip to content

Commit a3b3414

Browse files
Fail in case version file can't be donwloaded. This is an indication that
something went seriously wrong and any subsequent errors will point in the wrong direction.
1 parent 2335e63 commit a3b3414

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

jenkins/pipeline-parallel-mtr.groovy

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,10 +372,12 @@ def getServerVersion() {
372372
RAW_VERSION_LINK=$(echo ${GIT_REPO_LINK%.git} | sed -e "s:github.com:raw.githubusercontent.com:g")
373373
REPLY=$(curl -Is ${RAW_VERSION_LINK}/${BRANCH}/MYSQL_VERSION | head -n 1 | awk '{print $2}')
374374
if [[ ${REPLY} != 200 ]]; then
375-
curl ${RAW_VERSION_LINK}/${BRANCH}/VERSION -o ${WORKSPACE}/VERSION-${BUILD_NUMBER}
375+
VERSION_FILE=VERSION
376376
else
377-
curl ${RAW_VERSION_LINK}/${BRANCH}/MYSQL_VERSION -o ${WORKSPACE}/VERSION-${BUILD_NUMBER}
377+
VERSION_FILE=MYSQL_VERSION
378378
fi
379+
curl --fail ${RAW_VERSION_LINK}/${BRANCH}/${VERSION_FILE} -o ${WORKSPACE}/VERSION-${BUILD_NUMBER} || \
380+
{ echo "Failed to download MYSQL_VERSION file"; exit 1; }
379381
'''
380382
} // withCredentials
381383

@@ -749,7 +751,7 @@ pipeline {
749751
script {
750752
// Set ccache size as environment variable
751753
env.CCACHE_MAXSIZE = CCACHE_MAXSIZE
752-
754+
753755
// Set BUILD_PARAMS_TYPE based on ANALYZER_OPTS
754756
if (env.ANALYZER_OPTS) {
755757
if (env.ANALYZER_OPTS.contains('ASAN')) {

0 commit comments

Comments
 (0)