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 0857ad1e68..b5b344afa9 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 @@ -105,6 +105,51 @@ periodics: timeout: 2h max_concurrency: 1 extra_refs: + - org: kubevirt + repo: kubevirtci + base_ref: main + workdir: true + labels: + preset-podman-in-container-enabled: "true" + preset-docker-mirror-proxy: "true" + preset-gcs-credentials: "true" + preset-kubevirtci-quay-credential: "true" + cluster: kubevirt-prow-workloads + spec: + 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 && + ./hack/bump-centos-version.sh && + export PHASES=linux; export BYPASS_PMAN_CHANGE_CHECK=true; ./publish.sh && + # 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 && + #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: + - name: GIMME_GO_VERSION + value: "1.22.5" + securityContext: + privileged: true + resources: + requests: + memory: "29Gi" +- name: periodic-kubevirtci-bump-centos-base-s390x + cron: "15 4 * * 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 @@ -113,11 +158,12 @@ 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" - cluster: kubevirt-prow-workloads + preset-gcs-credentials: "true" + cluster: s390x-prow-virtual spec: containers: - image: quay.io/kubevirtci/pr-creator:v20240913-6773146 @@ -126,6 +172,21 @@ periodics: - "/bin/bash" - "-c" - > + # 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 && + 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") || echo "Failed to fetch KUBEVIRTCI_TAG" && + echo "Fetched KUBEVIRTCI_TAG: $KUBEVIRTCI_TAG" && 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"