diff --git a/github/ci/prow-deploy/files/jobs/kubevirt/kubevirtci/kubevirtci-periodics.yaml b/github/ci/prow-deploy/files/jobs/kubevirt/kubevirtci/kubevirtci-periodics.yaml index 4cc18ae32d..b1b8c826ce 100644 --- a/github/ci/prow-deploy/files/jobs/kubevirt/kubevirtci/kubevirtci-periodics.yaml +++ b/github/ci/prow-deploy/files/jobs/kubevirt/kubevirtci/kubevirtci-periodics.yaml @@ -130,7 +130,6 @@ periodics: SHORT_SHA=$(git rev-parse --short HEAD) && image_tag=$(cat cluster-provision/k8s/base-image | cut -d ':' -f 2) && echo "$image_tag" > amd64-centos9-$SHORT_SHA && - #TODO: replace with methods which work on s390x as gsutil not supported for s390x. gsutil cp ./amd64-centos9-$SHORT_SHA gs://kubevirt-prow/release/kubevirt/kubevirtci/amd64-centos9-$SHORT_SHA # docker-in-docker needs privileged mode env: @@ -174,10 +173,11 @@ periodics: - > # For getting centos image tag from amd64 prow job and use same for xs390x and manifest-list images SHORT_SHA=$(git rev-parse --short HEAD) && - GCS_FILE_PATH=gs://kubevirt-prow/release/kubevirt/kubevirtci/amd64-centos9-$SHORT_SHA && + GCS_FILE_PATH=release/kubevirt/kubevirtci/amd64-centos9-$SHORT_SHA && CHECK_INTERVAL=30 && + source /usr/local/bin/gcs_restapi.sh && while true; do - if gsutil -q stat "$GCS_FILE_PATH"; then + if stat_gcs_file kubevirt-prow "$GCS_FILE_PATH"; then echo "File $GCS_FILE_PATH is now available." break else @@ -185,7 +185,7 @@ periodics: sleep $CHECK_INTERVAL fi done && - export KUBEVIRTCI_TAG=$(gsutil cat "$GCS_FILE_PATH") || echo "Failed to fetch KUBEVIRTCI_TAG" && + export KUBEVIRTCI_TAG=$(cat_gcs_file kubevirt-prow "$GCS_FILE_PATH") || { echo "Failed to fetch KUBEVIRTCI_TAG"; exit 1; } && echo "Fetched KUBEVIRTCI_TAG: $KUBEVIRTCI_TAG" && cat $QUAY_PASSWORD | podman login --username $(<$QUAY_USER) --password-stdin quay.io && ./hack/bump-centos-version.sh && diff --git a/github/ci/prow-deploy/files/jobs/kubevirt/kubevirtci/kubevirtci-postsubmits.yaml b/github/ci/prow-deploy/files/jobs/kubevirt/kubevirtci/kubevirtci-postsubmits.yaml index d53df9d698..6e3b673eed 100644 --- a/github/ci/prow-deploy/files/jobs/kubevirt/kubevirtci/kubevirtci-postsubmits.yaml +++ b/github/ci/prow-deploy/files/jobs/kubevirt/kubevirtci/kubevirtci-postsubmits.yaml @@ -98,10 +98,11 @@ postsubmits: - > cat $QUAY_PASSWORD | podman login --username $(<$QUAY_USER) --password-stdin quay.io && SHORT_SHA=$(git rev-parse --short HEAD) && - GCS_FILE_PATH=gs://kubevirt-prow/release/kubevirt/kubevirtci/amd64-$SHORT_SHA && + GCS_FILE_PATH=release/kubevirt/kubevirtci/amd64-$SHORT_SHA && + source /usr/local/bin/gcs_restapi.sh CHECK_INTERVAL=30 && while true; do - if gsutil -q stat "$GCS_FILE_PATH"; then + if stat_gcs_file kubevirt-prow "$GCS_FILE_PATH"; then echo "File $GCS_FILE_PATH is now available." break else @@ -109,11 +110,12 @@ postsubmits: sleep $CHECK_INTERVAL fi done && - export KUBEVIRTCI_TAG=$(gsutil cat "$GCS_FILE_PATH") && + export KUBEVIRTCI_TAG=$(cat_gcs_file kubevirt-prow "$GCS_FILE_PATH") || { echo "Failed to fetch KUBEVIRTCI_TAG"; exit 1; } && + echo "Fetched KUBEVIRTCI_TAG: $KUBEVIRTCI_TAG" && ./publish.sh && echo "$(git tag --points-at HEAD | head -1)" > latest && - gsutil cp ./latest gs://kubevirt-prow/release/kubevirt/kubevirtci/latest - gsutil rm "$GCS_FILE_PATH" + upload_to_gcs ./latest kubevirt-prow release/kubevirt/kubevirtci/latest + rm_gcs_file kubevirt-prow "$GCS_FILE_PATH" # docker-in-docker needs privileged mode env: - name: GIMME_GO_VERSION