File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,16 @@ curl \
3030 -d " {\" status\" : \" staged\" , \" sourceRepo\" : \" libs-staging-local\" , \" targetRepo\" : \" ${targetRepo} \" }" \
3131 -f \
3232 -X \
33- POST " ${ARTIFACTORY_SERVER} /api/build/promote/${buildName} /${buildNumber} " > /dev/null || { echo " Failed to promote" >&2 ; exit 1; }
33+ POST " ${ARTIFACTORY_SERVER} /api/build/promote/${buildName} /${buildNumber} " > /dev/null || {
34+ result=$( curl -s -u ${ARTIFACTORY_USERNAME} :${ARTIFACTORY_PASSWORD} -f " ${ARTIFACTORY_SERVER} /api/build/${buildName} /${buildNumber} " )
35+ resultRepo=$( echo $result | jq -r ' .buildInfo.statuses[0].repository' )
36+ if [[ $resultRepo = " libs-release-local" ]]; then
37+ echo " Already promoted"
38+ else
39+ echo " Failed to promote" >&2
40+ exit 1
41+ fi
42+ }
3443
3544if [[ $RELEASE_TYPE = " RELEASE" ]]; then
3645 curl \
You can’t perform that action at this time.
0 commit comments