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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build multi-arch images #693

Merged
merged 3 commits into from
Feb 15, 2022
Merged

Build multi-arch images #693

merged 3 commits into from
Feb 15, 2022

Conversation

glebiller
Copy link

@glebiller glebiller commented Dec 29, 2021

Changes

Changed Dockerfile & Makefile to build a multi-platform (amd64 and arm64) image of jenkins-operator.
Using TARGETOS and TARGETARCH in the builder and leverage docker build build command in the Makefile.

馃挜 Breaking changes 馃挜
It is required to run docker buildx create --use before being able to create & push the image to registry.
Currently podman does not support buildx features, this changes requires CONTAINER_RUNTIME_COMMAND=docker.

馃И Unit tests changes 馃И
Fixing unit tests with the following changes:

  • reduce Jenkins CPU requirements from 1 to 250m
  • upgrade Jenkins image to jenkins/jenkins:2.319.3-lts

Release Notes

Support multi-arch (amd64 and arm64) container image.

Upgrade base plugins to following versions:
* configuration-as-code: v1346.ve8cfa_3473c94
* git: 4.10.3
* job-dsl: 1.78.1
* kubernetes: 1.31.3
* workflow-job: 1145.v7f2433caa07f

@glebiller
Copy link
Author

I am still investigating why there is a timeout when running e2e tests.
It looks like the operator running cannot access minikube through its public IP 192.168.49.2 :(

Makefile Outdated
--output=type=docker --platform linux/$* \
--build-arg GO_VERSION=$(GO_VERSION) \
--build-arg CTIMEVAR="$(CTIMEVAR)" \
--tag $(DOCKER_REGISTRY):$(GITCOMMIT) . \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should add the plateform to the tag name, something like
--tag $(DOCKER_REGISTRY):$(GITCOMMIT)-$* . \

@glebiller glebiller force-pushed the multi-arch branch 3 times, most recently from 4fdf07d to 687ee40 Compare February 11, 2022 17:53
@glebiller glebiller force-pushed the multi-arch branch 2 times, most recently from 0a8f405 to 410b66b Compare February 11, 2022 19:07
@glebiller
Copy link
Author

/assign @Sig00rd
By bumping the Jenkins version & changing the default version of Plugins to match the one installed by a standard install, all the e2e are now passing correctly, in addition to building the ARM version of the image :)

@Sig00rd
Copy link

Sig00rd commented Feb 15, 2022

Thanks @glebiller, great work!

@Sig00rd Sig00rd merged commit 17a5bfe into jenkinsci:master Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants