WINDUP-3763 Added 'multi-arch' profile to multi-arch CLI container build #75
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.
https://issues.redhat.com/browse/WINDUP-3763
The idea is to have the Windup CLI container (not the other containers) built for multiple architecture so that the Windup CLI can be easily consumed leveraging docker/podman.
The changes are meant to "not change anything" meaning:
default
profile (enabled by default) keeps running the JKubekubernetes-maven-plugin
so that a local CLI container image is created and pushed to local to local Docker daemon/Podman service. No changes to any command are required for running this (i.e.mvn clean install
will work as before)multi-arch
profile, when enabled (i.e. providing-Dmulti-arch
option) with disable thedefault
profile and enable thejib-maven-plugin
run a JIB container build.The multi-arch build has some limitations (ref. How do I specify a platform in the manifest list (or OCI index) of a base image?): the main one for us is that the images must be pushed to a remote registry because this kind of build "
Does not support pushing to a Docker daemon [...] or building a local tarball
"kubernetes-maven-plugin
have been moved to be properties so that they have been used also for thejib-maven-plugin
configuration hence zeroing the maintenance overhead in having 2 pluginsUsing the
jib-maven-plugin
is the only viable option because:kubernetes-maven-plugin
doesn't support yet multi-arch builds (ref. Support for <buildx> and Support for multiple platforms in jib build strategy issues)docker-maven-plugin
supports Multi-Architecture Build but, since docker and podman are not consistent in thebuildx
feature for running multi-arch builds, adopting this plugin would have dropped support for podman in this project and it wasn't a suitable optionTesting
mvn clean install -DskipTests
will prove everything works as beforemvn clean install -DskipTests -f cli/ -Dmulti-arch -Ddocker.name.windup.cli=quay.io/<your_quay_id>/windup-cli-openshift
will let you test the multi-arch build worked (keep in mind this, as described above, will push the images to the<your_quay_id>
account, sopodman login quay.io
must be executed in other to be authorized to push).An example of such a build is available at https://quay.io/repository/mrizzi/windup-cli-openshift?tab=tags