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:
Konstantinos Natsakis 2020-04-16 14:00:45 +03:00 committed by GitHub
parent 84101a234a
commit 2e7292a1a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

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

View File

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