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

ci: fix building included images. #91

Merged
merged 4 commits into from
Dec 9, 2024
Merged

ci: fix building included images. #91

merged 4 commits into from
Dec 9, 2024

Conversation

ericonr
Copy link
Member

@ericonr ericonr commented Dec 4, 2024

The included-images workflow was never triggered, probably due to workflow_run only really working on branches.

In order to simplify things, we move the step of building those images to the same workflow as the base images. With the help of an additional step, this also allows us to build (and test) the IOC images for PRs.

It was also necessary to add a conditional for building the included images, since they only use the Debian base image, not the Alpine one.

This way, it isn't necessary to pass the JOBS variable to speed up the
build when it is okay to use all machine resources (indicated by
JOBS=-1).
@ericonr ericonr force-pushed the ci-build-images branch 2 times, most recently from 60f310e to f409d7b Compare December 4, 2024 20:26
This is necessary for the docker buildx bake action to píck up all of
them.
The included-images workflow was never triggered, probably due to
workflow_run only really working on branches.

In order to simplify things, we move the step of building those images
to the same workflow as the base images. With the help of an additional
step, this also allows us to build the IOC images for PRs.

It was also necessary to add a conditional for building the included
images, since they only use the Debian base image, not the Alpine one.

In order to use the just-built base image, it was necessary to build it
with "load: true". And, in order to enable the included image builds to
locate the base image at all, it was necessary to set up a new builder,
with "driver: docker" [1]. The "docker" driver doesn't support caching,
so it's reserved for the included images.

[1] docker/buildx#159 (comment)
Copy link
Member Author

@ericonr ericonr left a comment

Choose a reason for hiding this comment

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

This PR is now actually ready for review :)

with:
driver: docker
- name: Build and push included IOC images
if: ${{ matrix.image.name == 'lnls-debian-11-epics-7' }}
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a new spot to change in #84

@ericonr ericonr merged commit 03b2696 into main Dec 9, 2024
2 checks passed
@ericonr ericonr deleted the ci-build-images branch December 9, 2024 14:01
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.

1 participant