diff --git a/hack/release.sh b/hack/release.sh index b7bc2d8be..3ca14802d 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -1,5 +1,18 @@ #!/bin/bash -xe +function eventually() { + retries=2 + interval=2 + n=0 + until [ "$n" -ge $retries ] + do + $@ && break + n=$((n+1)) + sleep $interval + done + [ "$n" -lt $retries ] +} + make IMAGE_TAG=$TAG docker-build docker-push git tag $TAG @@ -11,8 +24,9 @@ $GITHUB_RELEASE release -u kubevirt -r cluster-network-addons-operator \ --description "$(./hack/render-release-notes.sh $(./hack/versions.sh -2) $TAG)" for resource in "$@" ;do - $GITHUB_RELEASE upload -u kubevirt -r cluster-network-addons-operator \ + eventually $GITHUB_RELEASE upload -u kubevirt -r cluster-network-addons-operator \ --name $(basename $resource) \ --tag $TAG \ + -R \ --file $resource done