hack/release, Introduce eventually to resource upload
Files are not uploaded when the release scripts runs.
This is is probably due to a race between the creation
of the release and the manifest being accesible to upload.
Adding an eventually routine to aid the upload.
#!/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
