From 41f7f41fc8ece9794160b2531665af5a96b4b41c Mon Sep 17 00:00:00 2001 From: chandramerla Date: Fri, 26 Jul 2024 20:48:15 +0530 Subject: [PATCH] Added periodic-kubevirtci-bump-centos-base-s390x job to publish centos base for s390x and manifest-list Also modified periodic-kubevirtci-bump-centos-base (x86 job) to signal and pass KUBEVIRTCI_TAG to s390x job Signed-off-by: chandramerla --- .../kubevirtci/kubevirtci-periodics.yaml | 63 ++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) 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 d4081554bb..220584fd5d 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 @@ -113,10 +113,11 @@ periodics: repo: project-infra base_ref: main labels: - preset-docker-mirror: "true" + preset-docker-mirror-proxy: "true" preset-github-credentials: "true" preset-podman-in-container-enabled: "true" preset-kubevirtci-quay-credential: "true" + preset-gcs-credentials: "true" cluster: kubevirt-prow-workloads spec: containers: @@ -129,6 +130,66 @@ periodics: cat $QUAY_PASSWORD | podman login --username $(<$QUAY_USER) --password-stdin quay.io && ./hack/bump-centos-version.sh && GIT_ASKPASS=../project-infra/hack/git-askpass.sh ../project-infra/hack/git-pr.sh -c "PHASES=linux BYPASS_PMAN_CHANGE_CHECK=true ./publish.sh" -r kubevirtci -b bump-centos-stream -T main -p $(pwd) -s "Automatic bump of CentOS Stream to latest" + # For passing centos image tag to dependent (s390x) prow job + 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 && + gsutil cp ./amd64-centos9-$SHORT_SHA gs://kubevirt-prow/release/kubevirt/kubevirtci/amd64-centos9-$SHORT_SHA + # docker-in-docker needs privileged mode + env: + - name: GIMME_GO_VERSION + value: "1.22.5" + securityContext: + privileged: true + resources: + requests: + memory: "29Gi" +- name: periodic-kubevirtci-bump-centos-base-s390x + cron: "0 5 * * 2" + annotations: + testgrid-create-test-group: "false" + decorate: true + decoration_config: + timeout: 2h + max_concurrency: 1 + extra_refs: + - org: kubevirt + repo: kubevirtci + base_ref: main + workdir: true + labels: + preset-podman-in-container-enabled: "true" + preset-kubevirtci-quay-credential: "true" + preset-gcs-credentials: "true" + cluster: prow-s390x-workloads + spec: + containers: + - image: quay.io/kubevirtci/golang:v20241014-80f340c + command: + - "/usr/local/bin/runner.sh" + - "/bin/bash" + - "-c" + - > + # For getting centos image tag from amd64 prow job and use same for s390x and manifest-list images + SHORT_SHA=$(git rev-parse --short HEAD) && + GCS_FILE_PATH=release/kubevirt/kubevirtci/amd64-centos9-$SHORT_SHA && + CHECK_INTERVAL=30 && + source /usr/local/bin/gcs_restapi.sh && + while true; do + if stat_gcs_file kubevirt-prow "$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=$(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 && + export PHASES=linux; export BYPASS_PMAN_CHANGE_CHECK=true; ./publish.sh && + rm_gcs_file kubevirt-prow "$GCS_FILE_PATH" env: - name: GIMME_GO_VERSION value: "1.22.5"