Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prow jobs for publishing centos9 multi arch image #3788

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -125,10 +126,75 @@ periodics:
- "/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 &&
SHORT_SHA=$(git rev-parse --short HEAD) &&
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
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 4 * * 2" #Triggered at same time as x86 job so that both will run on same commit
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
KUBEVIRTCI_TAG=$(cat_gcs_file kubevirt-prow "$GCS_FILE_PATH")
if [ $? -ne 0 ]; then
echo "Failed to fetch KUBEVIRTCI_TAG"
exit 1
fi
export 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"
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