From 11b8e7c2defdd465bb36fa757f290569e7463c05 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 18 Jun 2019 20:38:38 -0700 Subject: [PATCH] Don't exit script on error Update CI scripts so that command failures do not cause an immediate exit. Prior to this commit, some of our looping logic would never run because the entire script would exit. --- ci/scripts/detect-jdk-updates.sh | 1 - ci/scripts/promote.sh | 3 +-- ci/scripts/sync-to-maven-central.sh | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/ci/scripts/detect-jdk-updates.sh b/ci/scripts/detect-jdk-updates.sh index 9881ffd1db..d418614a38 100755 --- a/ci/scripts/detect-jdk-updates.sh +++ b/ci/scripts/detect-jdk-updates.sh @@ -1,5 +1,4 @@ #!/bin/bash -set -e case "$JDK_VERSION" in java8) diff --git a/ci/scripts/promote.sh b/ci/scripts/promote.sh index 9882ba7c70..d9bef5edc5 100755 --- a/ci/scripts/promote.sh +++ b/ci/scripts/promote.sh @@ -1,5 +1,4 @@ #!/bin/bash -set -e source $(dirname $0)/common.sh @@ -31,7 +30,7 @@ curl \ -f \ -X \ POST "${ARTIFACTORY_SERVER}/api/build/promote/${buildName}/${buildNumber}" > /dev/null || { - result=$( curl -s -u ${ARTIFACTORY_USERNAME}:${ARTIFACTORY_PASSWORD} -f "${ARTIFACTORY_SERVER}/api/build/${buildName}/${buildNumber}" ) + result=$( curl -s -f -u ${ARTIFACTORY_USERNAME}:${ARTIFACTORY_PASSWORD} "${ARTIFACTORY_SERVER}/api/build/${buildName}/${buildNumber}" ) resultRepo=$( echo $result | jq -r '.buildInfo.statuses[0].repository' ) if [[ $resultRepo = "libs-release-local" ]]; then echo "Already promoted" diff --git a/ci/scripts/sync-to-maven-central.sh b/ci/scripts/sync-to-maven-central.sh index b92ee0ade9..f0825c84a0 100755 --- a/ci/scripts/sync-to-maven-central.sh +++ b/ci/scripts/sync-to-maven-central.sh @@ -1,5 +1,4 @@ #!/bin/bash -set -e buildName=$( cat artifactory-repo/build-info.json | jq -r '.buildInfo.name' ) buildNumber=$( cat artifactory-repo/build-info.json | jq -r '.buildInfo.number' )