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

docker-auto-build: rewrite matrix so that we don't need to parse stuff via regex #370

Open
rdimaio opened this issue Feb 7, 2025 · 0 comments

Comments

@rdimaio
Copy link
Contributor

rdimaio commented Feb 7, 2025

We have this matrix:

matrix:
context: [
'clients, prepend-rucio, prepend-release, push-tagged, push-latest', # Common production Rucio clients
'server, prepend-rucio, prepend-release, push-tagged, push-latest, push-alma9-latest', # Common production Rucio server
'daemons, prepend-rucio, prepend-release, push-tagged, push-latest, push-alma9-latest', # Common production Rucio daemons
'dev, prepend-rucio, prepend-release, push-tagged, push-latest, push-alma9-latest', # Rucio development container
'ui, prepend-rucio, prepend-release, push-tagged, push-latest', # Common production Rucio UI server
'webui, prepend-rucio, prepend-release, push-tagged, push-latest', # Common production Rucio WebUI server
'init, prepend-rucio, prepend-release, push-tagged, push-latest', # Initalization container for Rucio database
'probes, push-tagged, push-latest', # Common production probes container
'test-fts, push-tagged, push-latest', # Testing FTS containers
'fts-cron/Dockerfile_cpp, push-tagged, push-latest', # Common production fts-cron proxy delegation
'fts-cron/Dockerfile_java, push-tagged, push-latest, custom-tag=java', # Common production fts-cron proxy delegation
'test-ssh, push-tagged, push-latest', # Testing SSH RSE container
'test-xrootd, push-tagged, push-latest', # Testing XROOTD RSE container
'test-xrootd-noauth, push-tagged, push-latest', # Testing XROOTD-NOAUTH RSE container
'fs, rucio-clients:release-#TAG, prepend-rucio, push-tagged, push-latest', # Common production Rucio fuse mount
'test-webdav, push-latest' # Testing WebDAV RSE container
]

And for each line like clients, prepend-rucio, prepend-release, push-tagged, push-latest, we essentially parse each part out in the 'Generate Docker Image Names' script (this step does not just generate image names, but actually determines whether images are actually pushed or not, so we should probably rename it)

Instead of doing this, we can rewrite the matrix to have stuff like prepend-rucio, prepend-release as boolean key/values, so that we don't need to do any regex parsing when generating the image name and determining whether to push it or not (which should likely also be faster):

https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/running-variations-of-jobs-in-a-workflow

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

No branches or pull requests

1 participant