Skip to content

Simplify the creation of Docker/Singularity images#237

Merged
yasahi-hpc merged 4 commits intomainfrom
ci/change-base-creation
Mar 24, 2025
Merged

Simplify the creation of Docker/Singularity images#237
yasahi-hpc merged 4 commits intomainfrom
ci/change-base-creation

Conversation

@pzehner
Copy link
Collaborator

@pzehner pzehner commented Mar 19, 2025

Given the recent security breach that affected the tj-actions/changed-files GitHub action, this was a good opportunity to reevaluate the way the project manages the creation of Docker images.

Currently, we have 2 sets of images: one for when the Dockerfiles are not modified (prefixed _main), and one for when the Dockerfiles are modified (prefixed _pr). Any feature branch that updated the Dockerfiles would then re-create its images on the fly. While very flexible, this process has not proven to be intensively used. Updating the Docker images is a somehow rare task. On the other hand, it generated a lot of complexity in the CI files.

This PR proposes to simplify the creation of Docker/Singularity images by separating the workflow between create_images, that only takes care of creating the images when a Dockerfile is modified, and the traditional build_test, that only uses the images. The registry will then only have one set of images, without suffixes.

If images need to be modified, then this should be done in a 2-step approach:

  • Step 1: Create a PR that updates or creates the image; have it merged; and
  • Step 2: Create a PR that uses the new image.

Progress so far:

  • Modify the CI files;
  • Force the creation of images without suffix;
  • Finalize the CI files.

@pzehner pzehner added the CI label Mar 19, 2025
@pzehner pzehner self-assigned this Mar 19, 2025
@pzehner pzehner force-pushed the ci/change-base-creation branch from 3bceff3 to bc6fcbd Compare March 19, 2025 18:26
@yasahi-hpc yasahi-hpc marked this pull request as ready for review March 24, 2025 08:47
@pzehner pzehner force-pushed the ci/change-base-creation branch from 94ef471 to 6eeff64 Compare March 24, 2025 09:01
@yasahi-hpc yasahi-hpc merged commit c85a443 into main Mar 24, 2025
23 of 24 checks passed
@yasahi-hpc yasahi-hpc deleted the ci/change-base-creation branch March 24, 2025 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants