@cryptotaxi247 / netdata-1 / commits / 2e7292a1a

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

Konstantinos Natsakis committed Apr 16, 2020 at 14:00 UTC 2e7292a1a07c9a5e4ffed6d4a05b2d5c6cfc1aae
2 files changed +8
.travis/utils.sh
+2
@@ -12,6 +12,7 @@ tick() {
12 kill $PID
13 return $RET
14 }
15 +export -f tick
16
17 retry() {
18 local tries=$1
@@ -25,3 +26,4 @@ retry() {
26
27 return 1
28 }
29 +export -f retry
packaging/docker/publish.sh
+6
@@ -74,6 +74,12 @@ for ARCH in ${ARCHS[@]}; do
74 TAG="${MANIFEST_LIST}-${ARCH}"
75 echo "Publishing image ${TAG}.."
76 $DOCKER_CMD push "${TAG}"
77 +
78 + published() {
79 + curl -s "https://registry.hub.docker.com/v2/repositories/${REPOSITORY}/tags" | jq -e -r '.results[] | select(.name == "'"${VERSION}-${ARCH}"'")' > /dev/null
80 + }
81 + retry 5 published
82 +
83 echo "Image ${TAG} published succesfully!"
84 done
85