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 images all in one step to avoid potentially building on different incompatible architectures #368

Merged
merged 1 commit into from
Mar 4, 2022

Conversation

ChristopherHogan
Copy link
Collaborator

@ChristopherHogan ChristopherHogan commented Mar 4, 2022

I originally set the 3 docker builds up as a matrix in order to reduce code duplication. However, that has the effect of running the three builds on 3 different github-hosted runners. The problem with this is that the runners could be provisioned on multiple different architectures (see here and here). If the deps.Dockerfile gets built on Haswell for example, and the dev.Dockerfile gets built on Cascade Lake, then the dev.Dockerfile doesn't recognize the dependencies that spack installed in deps.Dockerfile because the architecture is part of the package hash. In order to ensure that all 3 images are built on the same architecture, I've put them sequentially in the same job.

Additionally, we can't accept a tag as a workflow dispatch input because checking out an older tag would lose the changes at the HEAD of the branch we're building. For example, I want to build the v0.4.0-beta tag, but If I check out that tag, then the docker files are at the top level directory instead of in the docker folder. That means if the docker builds fail on the initial tag, we have to either do another release, or build from HEAD instead of the tag.

@ChristopherHogan ChristopherHogan added bug Something isn't working testing Related to automated testing or CI labels Mar 4, 2022
@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 81.595% when pulling d2d613d on chogan/single_job_docker into b395d17 on master.

@ChristopherHogan ChristopherHogan merged commit aaf4bd3 into master Mar 4, 2022
@ChristopherHogan ChristopherHogan deleted the chogan/single_job_docker branch March 4, 2022 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working testing Related to automated testing or CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants