Skip to content

Commit

Permalink
Added periodic-kubevirtci-bump-centos-base-s390x job to publish cento…
Browse files Browse the repository at this point in the history
…s 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 <[email protected]>
  • Loading branch information
chandramerla committed Nov 11, 2024
1 parent 6406af5 commit 41f7f41
Showing 1 changed file with 62 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
Expand Down

0 comments on commit 41f7f41

Please sign in to comment.