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

Releasing versioned (base) images #10827

Merged
merged 144 commits into from
Sep 20, 2024
Merged

Conversation

poikilotherm
Copy link
Contributor

@poikilotherm poikilotherm commented Sep 6, 2024

What this PR does / why we need it:
We want to release versioned tags of the base image (and eventually the application images, too).
This requires setting up different versioning within the POM files, a better maintenance workflow to keep images updated and coordination between connected workflows.

Which issue(s) this PR closes:

Special notes for your reviewer:
Open TODOs to call this done:

  • Application image push workflow needs a tag on PRs, as it can't use the input var from workflow_call
  • Needs testing if it works with the PR comment (needs a PR within the fork to test this without merging here first)
  • Move Docker Hub image description README update for gdcc/base to maintenance workflow, also listing the supported tags
  • Finalize PR after all testing etc is done by switching all the action references and many other pieces to match the upstream IQSS (see TODO annotations in the code)
  • Add release note
  • Optional: add path filtering as annotated to avoid duplicate runs and race conditions
  • Optional: add app image builds directly into the maintenance workflow (might be a separate PR within scope of Tags for application container images #10618 )

Suggestions on how to test this:
All testing can only be done in the fork, as most of the workflows must be on the default branch to test them.
This has been done thoroughly, but there may be other non-testable edge cases we will only trip over once merged.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No

Is there a release notes update needed for this change?:
Probably.

Additional documentation:

grafik
grafik

Preview docs at https://dataverse-guide--10827.org.readthedocs.build/en/10827/container/base-image.html

For scheduled maintenance, we will provide updates to the last three base images as well as the develop branch.
Checkout the branch/tag we receive from the discovery job
…from Maven

Using Maven properties, we find out which is the projects preferred Java version. We don't need a build matrix here.
We no longer work on PRs in this workflow, so we don't need to safeguard against not running steps in this case.
We no longer work on PRs in this workflow, so we don't need to safeguard against not running steps in this case.

Also we no longer use the static image names, but rely on the truth Maven has in the container-base module about the version of the image.
Fix jq output by removing newlines and superfluous whitespace.
…cceed

We use the branch name from the matrix as input argument. It's not being used yet.
Deleted by accident when working on alternativ matrix way to build app image after base.
- Enable -Ddocker.noCache for BuildX
- Hopefully straightens out some bugs on Darwin with M1/M2
This way we have a distinct path and name to inject a BuildX builder instance configuration
Before, we would have run the workflow for develop only. In case develop has merges before the run starts because of a tag being created, this may result in undesired side effects.

Keep in mind that pushes of tags here will also trigger releasing a new application image!
Re-enable and change everything necessary to reference the upstream IQSS context as of now.
Without this in case of the pull_request event the input is null and the build fails because we have base image defined at all.

Simply not adding the option if the input is undefined means we stick to what is defined within the POM.
@poikilotherm poikilotherm marked this pull request as ready for review September 19, 2024 21:00
@pdurbin pdurbin assigned pdurbin and unassigned poikilotherm Sep 19, 2024
Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

Looks good to me! Just a tiny comment below.

pom.xml Show resolved Hide resolved
Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

I don't expect this to cause any problems for Dataverse itself (no Java code was touched). I'm merging this in the interest of science and progress. We can back it out if need be. 🚀

@pdurbin pdurbin merged commit 1d31fb0 into IQSS:develop Sep 20, 2024
12 of 15 checks passed
@pdurbin pdurbin added this to the 6.4 milestone Sep 20, 2024
@pdurbin pdurbin removed their assignment Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Containers Anything related to cloudy Dataverse, shipped in containers. Size: 3 A percentage of a sprint. 2.1 hours.
Projects
Status: Important
Status: Done 🧹
Development

Successfully merging this pull request may close these issues.

Tag version for the container base image
3 participants