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

WINDUP-3763 Added 'multi-arch' profile to multi-arch CLI container build #75

Merged
merged 3 commits into from
Mar 31, 2023

Conversation

mrizzi
Copy link
Member

@mrizzi mrizzi commented Mar 29, 2023

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:

  • the default profile (enabled by default) keeps running the JKube kubernetes-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)
  • the multi-arch profile, when enabled (i.e. providing -Dmulti-arch option) with disable the default profile and enable the jib-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"
  • the values (already used) for previously configuring the JKube kubernetes-maven-plugin have been moved to be properties so that they have been used also for the jib-maven-plugin configuration hence zeroing the maintenance overhead in having 2 plugins

Using the jib-maven-plugin is the only viable option because:

Testing

  1. mvn clean install -DskipTests will prove everything works as before
  2. mvn 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, so podman 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

@m-brophy m-brophy merged commit dc25ba9 into windup:master Mar 31, 2023
@mrizzi mrizzi deleted the WINDUP-3763 branch March 31, 2023 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants