forked from VirtusLab/jenkins-operator
-
Notifications
You must be signed in to change notification settings - Fork 242
Fix Restart loop on ARM #1124 by adding multi-arch backup pvc multiarch #1136
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
Open
Devansh-ops
wants to merge
2
commits into
jenkinsci:master
Choose a base branch
from
Devansh-ops:fix/backup-pvc-multiarch
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix Restart loop on ARM #1124 by adding multi-arch backup pvc multiarch #1136
Devansh-ops
wants to merge
2
commits into
jenkinsci:master
from
Devansh-ops:fix/backup-pvc-multiarch
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introduce PLATFORMS default (arm64, amd64, s390x, ppc64le) and a docker-buildx target to build and push multi-arch images (IMG=...). The target generates a Dockerfile.cross with platform support, creates and uses a buildx builder, passes UID/GID build args, and cleans up. Mirrors the root Makefile to enable cross-arch image builds. Fixes jenkinsci#1124
Update VERSION.txt and the Helm chart (README, values.yaml) to use quay.io/jenkins-kubernetes-operator/backup-pvc:v0.4.4 so docs and defaults match the new release. bumping the version as part of fixing jenkinsci#1124 based on comment jenkinsci#1124 (comment)
brokenpip3
reviewed
Oct 18, 2025
| .PHONY: docker-buildx | ||
| docker-buildx: check-env ## Build and push multi-arch image (set IMG=quay.io/...:tag) | ||
| @echo "+ $@" | ||
| sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no need of doing this, take a look on how we do the whole flow in the root project makefile:
Lines 304 to 364 in bf040e1
| .PHONY: container-runtime-build-% | |
| container-runtime-build-%: ## Build the container | |
| @echo "+ $@" | |
| $(CONTAINER_RUNTIME_COMMAND) buildx build \ | |
| --output=type=docker --platform linux/$* \ | |
| --build-arg GO_VERSION=$(GO_VERSION) \ | |
| --build-arg CTIMEVAR="$(CTIMEVAR)" \ | |
| --tag quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY):$(GITCOMMIT)-$* . \ | |
| --file Dockerfile $(CONTAINER_RUNTIME_EXTRA_ARGS) | |
| .PHONY: container-runtime-build | |
| container-runtime-build: check-env deepcopy-gen container-runtime-build-amd64 container-runtime-build-arm64 | |
| .PHONY: container-runtime-images | |
| container-runtime-images: ## List all local containers | |
| @echo "+ $@" | |
| $(CONTAINER_RUNTIME_COMMAND) images $(CONTAINER_RUNTIME_EXTRA_ARGS) | |
| define buildx-create-command | |
| $(CONTAINER_RUNTIME_COMMAND) buildx create \ | |
| --driver=docker-container \ | |
| --use | |
| endef | |
| ## Parameter is version | |
| define container-runtime-push-command | |
| $(CONTAINER_RUNTIME_COMMAND) buildx build \ | |
| --output=type=registry --platform linux/amd64,linux/arm64 \ | |
| --build-arg GO_VERSION=$(GO_VERSION) \ | |
| --build-arg CTIMEVAR="$(CTIMEVAR)" \ | |
| --tag quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY):$(1) . \ | |
| --file Dockerfile $(CONTAINER_RUNTIME_EXTRA_ARGS) | |
| endef | |
| .PHONY: container-runtime-push | |
| container-runtime-push: check-env deepcopy-gen ## Push the container | |
| @echo "+ $@" | |
| $(call buildx-create-command) | |
| $(call container-runtime-push-command,$(BUILD_TAG)) | |
| .PHONY: container-runtime-snapshot-push | |
| container-runtime-snapshot-push: check-env deepcopy-gen | |
| @echo "+ $@" | |
| $(call buildx-create-command) | |
| $(call container-runtime-push-command,$(GITCOMMIT)) | |
| .PHONY: container-runtime-release-version | |
| container-runtime-release-version: check-env deepcopy-gen ## Release image with version tag (in addition to build tag) | |
| @echo "+ $@" | |
| $(call buildx-create-command) | |
| $(call container-runtime-push-command,$(VERSION_TAG)) | |
| .PHONY: container-runtime-release-latest | |
| container-runtime-release-latest: check-env deepcopy-gen ## Release image with latest tags (in addition to build tag) | |
| @echo "+ $@" | |
| $(call buildx-create-command) | |
| $(call container-runtime-push-command,$(LATEST_TAG)) | |
| .PHONY: container-runtime-release | |
| container-runtime-release: container-runtime-release-version container-runtime-release-latest ## Release image with version and latest tags (in addition to build tag) | |
| @echo "+ $@" |
also in this file we already have a docker-* commands, let's resume those, ty!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
How to publish multi-arch images (same pattern as root)
make -C backup/pvc docker-buildx IMG=quay.io/jenkins-kubernetes-operator/backup-pvc:v0.4.4make -C backup/pvc docker-buildx IMG=quay.io/jenkins-kubernetes-operator/backup-pvc:latestSubmitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.