Skip to content

Commit

Permalink
hack/release, Introduce eventually to resource upload (#1418)
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Ram Lavi <[email protected]>

Signed-off-by: Ram Lavi <[email protected]>
Co-authored-by: Ram Lavi <[email protected]>
  • Loading branch information
kubevirt-bot and RamLavi authored Sep 15, 2022
1 parent 4c87562 commit 216922e
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion hack/release.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

0 comments on commit 216922e

Please sign in to comment.