diff options
author | Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com> | 2020-04-16 14:00:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-16 14:00:45 +0300 |
commit | 2e7292a1a07c9a5e4ffed6d4a05b2d5c6cfc1aae (patch) | |
tree | 7cca893718fecc66a25f68edab3ad95903fc9544 | |
parent | 84101a234a6c3e138c6be3a9dc4c03a89e689333 (diff) |
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
-rw-r--r-- | .travis/utils.sh | 2 | ||||
-rwxr-xr-x | packaging/docker/publish.sh | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/.travis/utils.sh b/.travis/utils.sh index 58ce47f0ae..d084a7aef3 100644 --- a/.travis/utils.sh +++ b/.travis/utils.sh @@ -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 diff --git a/packaging/docker/publish.sh b/packaging/docker/publish.sh index 30ee850dfe..371263cf28 100755 --- a/packaging/docker/publish.sh +++ b/packaging/docker/publish.sh @@ -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 |