mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Allow promote script to be run again
This commit is contained in:
parent
d6496c00b9
commit
c7746fba3b
@ -30,7 +30,16 @@ curl \
|
||||
-d "{\"status\": \"staged\", \"sourceRepo\": \"libs-staging-local\", \"targetRepo\": \"${targetRepo}\"}" \
|
||||
-f \
|
||||
-X \
|
||||
POST "${ARTIFACTORY_SERVER}/api/build/promote/${buildName}/${buildNumber}" > /dev/null || { echo "Failed to promote" >&2; exit 1; }
|
||||
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}" )
|
||||
resultRepo=$( echo $result | jq -r '.buildInfo.statuses[0].repository' )
|
||||
if [[ $resultRepo = "libs-release-local" ]]; then
|
||||
echo "Already promoted"
|
||||
else
|
||||
echo "Failed to promote" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ $RELEASE_TYPE = "RELEASE" ]]; then
|
||||
curl \
|
||||
|
Loading…
Reference in New Issue
Block a user