packaging/docker/publish.sh: Wait for tag to appear in hub.docker.com (#8713)
* packaging/docker/publish.sh: Wait for tag to be really published * Fix typo * .travis/utils.sh: Export defined functions too * packaging/docker/publish.sh: Keep shellcheck happy * packaging/docker/publish.sh: Fix typo
This commit is contained in:
parent
84101a234a
commit
2e7292a1a0
|
@ -12,6 +12,7 @@ tick() {
|
|||
kill $PID
|
||||
return $RET
|
||||
}
|
||||
export -f tick
|
||||
|
||||
retry() {
|
||||
local tries=$1
|
||||
|
@ -25,3 +26,4 @@ retry() {
|
|||
|
||||
return 1
|
||||
}
|
||||
export -f retry
|
||||
|
|
|
@ -74,6 +74,12 @@ for ARCH in ${ARCHS[@]}; do
|
|||
TAG="${MANIFEST_LIST}-${ARCH}"
|
||||
echo "Publishing image ${TAG}.."
|
||||
$DOCKER_CMD push "${TAG}"
|
||||
|
||||
published() {
|
||||
curl -s "https://registry.hub.docker.com/v2/repositories/${REPOSITORY}/tags" | jq -e -r '.results[] | select(.name == "'"${VERSION}-${ARCH}"'")' > /dev/null
|
||||
}
|
||||
retry 5 published
|
||||
|
||||
echo "Image ${TAG} published succesfully!"
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in New Issue