From 289f8fe3099062a5818e81053ce0600431f633ec Mon Sep 17 00:00:00 2001 From: chandramerla Date: Mon, 22 Jul 2024 19:51:28 +0530 Subject: [PATCH] Added postsubmit prow job for s390x provider publishing and modified x86 one to also publish manifest-list Signed-off-by: chandramerla --- .../kubevirtci/kubevirtci-postsubmits.yaml | 67 ++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) 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 7237540be6..d53df9d698 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 @@ -18,7 +18,6 @@ postsubmits: preset-podman-in-container-enabled: "true" preset-docker-mirror-proxy: "true" preset-gcs-credentials: "true" - preset-github-credentials: "true" preset-kubevirtci-quay-credential: "true" cluster: kubevirt-prow-workloads spec: @@ -47,8 +46,74 @@ postsubmits: - > cat $QUAY_PASSWORD | podman login --username $(<$QUAY_USER) --password-stdin quay.io && ./publish.sh && + SHORT_SHA=$(git rev-parse --short HEAD) && + # Adds git tag created by publish.sh above into the file + echo "$(git tag --points-at HEAD | head -1)" > amd64-$SHORT_SHA && + gsutil cp ./amd64-$SHORT_SHA gs://kubevirt-prow/release/kubevirt/kubevirtci/amd64-$SHORT_SHA + # docker-in-docker needs privileged mode + env: + - name: GIMME_GO_VERSION + value: "1.22.5" + securityContext: + privileged: true + volumeMounts: + - mountPath: /dev + name: devices + resources: + requests: + memory: "29Gi" + - name: publish-kubevirtci-s390x + branches: + - main + always_run: true + annotations: + testgrid-create-test-group: "false" + decorate: true + decoration_config: + timeout: 2h + max_concurrency: 1 + extra_refs: + - org: kubevirt + repo: project-infra + base_ref: main + labels: + preset-podman-in-container-enabled: "true" + preset-docker-mirror-proxy: "true" + preset-gcs-credentials: "true" + preset-github-credentials: "true" + preset-kubevirtci-quay-credential: "true" + cluster: s390x-prow-virtual + spec: + volumes: + - hostPath: + path: /dev + type: Directory + name: devices + containers: + - image: quay.io/kubevirtci/golang:v20240814-9b6c4af + command: + - "/usr/local/bin/runner.sh" + - "/bin/bash" + - "-c" + - > + 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 && + CHECK_INTERVAL=30 && + while true; do + if gsutil -q stat "$GCS_FILE_PATH"; then + echo "File $GCS_FILE_PATH is now available." + break + else + echo "File $GCS_FILE_PATH not found. Checking again in $CHECK_INTERVAL seconds." + sleep $CHECK_INTERVAL + fi + done && + export KUBEVIRTCI_TAG=$(gsutil cat "$GCS_FILE_PATH") && + ./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" # docker-in-docker needs privileged mode env: - name: GIMME_GO_VERSION