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

feat: provide the sha256 digest as an oci_image target #346

Merged
merged 1 commit into from
Aug 31, 2023
Merged

Conversation

alexeagle
Copy link
Collaborator

@alexeagle alexeagle commented Aug 31, 2023

Fixes #60

Ran into this at a client and I'd rather not paste the genrule everywhere.

@alexeagle alexeagle merged commit 3dcec99 into main Aug 31, 2023
15 checks passed
@alexeagle alexeagle deleted the i60 branch August 31, 2023 20:57
alexeagle added a commit that referenced this pull request Sep 13, 2023
Hashes should generally be prefixed with the hash algorithm used.
Also, the intent of adding .digest in #346 was to make the migration from rules_docker easier, so we should match its output, as shown
https://github.com/bazelbuild/rules_docker/blob/master/tests/container/BUILD#L248-L251

Note, this is not a breaking change, because the commit from #346 was not yet released.
@hanikesn
Copy link

I suspect this change breaks the build for our images marked with testonly:

ERROR: /__w/BUILD:31:30: in directory_path rule //X:X-e2e-tests_image_index_json: non-test target '//X:X-e2e-tests_image_index_json' depends on testonly target '//X:X-e2e-tests_image' and doesn't have testonly attribute set

@thesayyn
Copy link
Collaborator

I suspect this change breaks the build for our images marked with testonly:

ERROR: /__w/BUILD:31:30: in directory_path rule //X:X-e2e-tests_image_index_json: non-test target '//X:X-e2e-tests_image_index_json' depends on testonly target '//X:X-e2e-tests_image' and doesn't have testonly attribute set

could you please file an issue for this?

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.

Extract container image hash for use during later build steps
3 participants