Skip to content

Implement 'latest' tag for docker and apptainer container images#11

Merged
tomlunderwood merged 4 commits intomainfrom
PSDI-477-implement-latest-tag
Mar 28, 2025
Merged

Implement 'latest' tag for docker and apptainer container images#11
tomlunderwood merged 4 commits intomainfrom
PSDI-477-implement-latest-tag

Conversation

@tomlunderwood
Copy link
Collaborator

@tomlunderwood tomlunderwood commented Mar 28, 2025

In this PR I modify the CI/CD pipeline so that whenever a container image is published in the container registry for this repo, and the tag for the container image is of the form v*.*.* (where * are non-negative integers), the container image is additionally given the 'latest' tag. This is the case for both the docker and the apptainer images generated by the CI/CD pipeline.

Moreover, in this PR I have also activated security scans via the anchore-scan job in the CI/CD pipeline. This had been deactivated while the repository was private. However, now that the repo has recently been made public, the scans can be used. Note though that they will only run in the main branch, so no scans will run until this PR is merged.

Evidence that the pipeline can generate a 'latest' tag successfully can be found at:

Note that in both cases the 'latest' tag can be seen to be in operation. However, in this case to generate the 'latest' tag I - for testing purposes - disabled the check that the tag has the form v*.*.*. (The job which generated the 'latest' tag here is https://github.com/PSDI-UK/data-transfer-container/actions/runs/14129397837/job/39585746845). When the PR is merged the pipeline will have the desired behaviour: 'latest' tags will only be generated for container images which have tags of the form v*.*.*.

This PR completes the part of https://stfc.atlassian.net/browse/PSDI-477 pertaining to the data-transfer-container repo.

@tomlunderwood tomlunderwood self-assigned this Mar 28, 2025
Copy link

@stuart-stfc stuart-stfc left a comment

Choose a reason for hiding this comment

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

LGTM

@tomlunderwood tomlunderwood merged commit 0b9a08c into main Mar 28, 2025
2 checks passed
@tomlunderwood tomlunderwood deleted the PSDI-477-implement-latest-tag branch March 28, 2025 13:27
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.

2 participants