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.
This commit is contained in:
Phillip Webb
2019-06-18 20:38:38 -07:00
parent fb90803dbf
commit 11b8e7c2de
3 changed files with 1 additions and 4 deletions

View File

@@ -1,5 +1,4 @@
#!/bin/bash
set -e
case "$JDK_VERSION" in
java8)

View File

@@ -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"

View File

@@ -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' )