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

Build docker image with Maven #408

Merged
merged 3 commits into from
Jun 20, 2022

Conversation

pihme
Copy link
Contributor

@pihme pihme commented Jun 16, 2022

Description

For local builds (on a developer's workstation) a Docker image is built by Maven on the fly. This image is then used in QA tests with testcontainers. All tests locally will be run with Java 17.

The GitHub workflows should be unperturbed by this change.

Review hints

Please have a look at the issue for the intended scope of the change.

I think there could be further steps to also use Maven to build the Docker image as part of the GHA workflows, but I wanted to keep the change set small.

Now, effectively Maven will build a local Docker image that is tagged with the project version and GHA for build and test will build a Docker image that is tagged with the SHA value. So the two shouldn't conflict with each other 🤞

I was also wondering whether we should document this #407 (comment) as part of some developer documentation. Basically, I always need an hour or two to wrap my head around how this works in detail. It is easy to see from the GHA workflows what is happening, but not so easy to piece together why it needs to happen in that way. Please let me know what you think.

This will also use the default time stamping for the created images. Please read the reasoning here: https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#why-is-my-image-created-48-years-ago I opted not to deviate from the default. Again, please let me know what you think

Related issues

closes #407

Definition of Done

Code changes:

  • The changes are backwards compatibility with previous versions
  • If it fixes a bug then PRs are created to backport the fix

Testing:

  • There are unit/integration tests that verify all acceptance criterias of the issue
  • New tests are written to ensure backwards compatibility with further versions
  • The behavior is tested manually

Documentation:

  • Javadoc has been written
  • The documentation is updated

Note: this is only for local builds to have a smoother development flow. All tests locally will be run with Java 17.

The GitHub workflows should be unperturbed by this change.
@pihme pihme requested a review from remcowesterhoud June 16, 2022 13:24
@github-actions
Copy link

github-actions bot commented Jun 16, 2022

Unit Test Results

  47 files    47 suites   1m 50s ⏱️
107 tests 107 ✔️ 0 💤 0
340 runs  340 ✔️ 0 💤 0

Results for commit e3050d1.

♻️ This comment has been updated with latest results.

@pihme pihme marked this pull request as draft June 16, 2022 13:28
@pihme pihme marked this pull request as ready for review June 17, 2022 05:52
Copy link
Contributor

@remcowesterhoud remcowesterhoud left a comment

Choose a reason for hiding this comment

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

🚀 Great change

@remcowesterhoud remcowesterhoud merged commit 9158097 into main Jun 20, 2022
@remcowesterhoud remcowesterhoud deleted the 407-build-docker-image-with-maven branch June 20, 2022 09:30
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.

Build Docker image as part of Maven build
2 participants