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: skip cosign / sbom in case of building images during cache rebuild #26786

Merged
merged 1 commit into from Jul 19, 2023

Conversation

mhofstetter
Copy link
Member

@mhofstetter mhofstetter commented Jul 12, 2023

Docker cache re-build is triggered via event workflow_run. In this case, the container image isn't pushed to a docker registry, therefore outputs.digest isn't set. This results in cosign and sbom steps to fail because they depend on this.

This commit fixes this by only executing these steps in case of a github event of type push.

Cosign & sbom support has been introduced after the cache. It looks like the cache-refresh use-case hasn't been considered.

Failing runs: https://github.com/cilium/cilium/actions/workflows/build-images-ci.yaml?query=event%3Aworkflow_run

Docker cache re-build is triggered via event `workflow_run`. In this case,
the container image isn't puhed to a docker image, therefore
`outputs.digest` isn't set. This results in cosign and sbom steps
to fail because they depend on this.

This commit fixes this by only executing these steps in case of a github
event of type `push`.

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
@mhofstetter mhofstetter added kind/bug This is a bug in the Cilium logic. area/CI Continuous Integration testing issue or flake release-note/misc This PR makes changes that have no direct user impact. labels Jul 12, 2023
@mhofstetter mhofstetter requested review from a team as code owners July 12, 2023 12:27
@mhofstetter
Copy link
Member Author

/test

Copy link
Member

@nbusseneau nbusseneau left a comment

Choose a reason for hiding this comment

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

Nice catch.

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jul 18, 2023
@aditighag aditighag merged commit 56960c7 into cilium:main Jul 19, 2023
66 checks passed
@mhofstetter mhofstetter deleted the pr/mhofstetter/fix-cache-restore branch July 19, 2023 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/CI Continuous Integration testing issue or flake kind/bug This is a bug in the Cilium logic. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants