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

Always produce OCI images and indexes #449

Merged
merged 2 commits into from
Oct 5, 2021
Merged

Conversation

imjasonh
Copy link
Member

Followup from #354

Before this change, if the base image was a Docker manifest list, it could not be annotated with base image information. With this change, ko always produces OCI images and indexes, which can be annotated.

Verified manually as well:

$ crane manifest $(go run ./ publish ./test --platform=all) | jq '.annotations'
...
{
  "org.opencontainers.image.base.digest": "sha256:7cb5539ebb7b99352d736ed97668060cee123285f01705b910891acdf7d945e3",
  "org.opencontainers.image.base.name": "gcr.io/distroless/static:nonroot"
}                                                                                                                                                      

@jonjohnsonjr
Copy link
Collaborator

My only reluctance here is breaking folks that push to old registries that won't support OCI. I guess they could just use an old version of ko... wdyt?

@imjasonh
Copy link
Member Author

My only reluctance here is breaking folks that push to old registries that won't support OCI. I guess they could just use an old version of ko... wdyt?

Yeah... we could have an --oci flag that defaults true?

pkg/build/gobuild.go Outdated Show resolved Hide resolved
@jonjohnsonjr
Copy link
Collaborator

Yeah... we could have an --oci flag that defaults true?

I'd be ok with deferring this until someone complains.

@codecov-commenter
Copy link

Codecov Report

Merging #449 (8c089af) into main (2adcadd) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #449   +/-   ##
=======================================
  Coverage   53.25%   53.26%           
=======================================
  Files          36       36           
  Lines        1842     1838    -4     
=======================================
- Hits          981      979    -2     
+ Misses        710      709    -1     
+ Partials      151      150    -1     
Impacted Files Coverage Δ
pkg/build/gobuild.go 58.51% <100.00%> (+0.07%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2adcadd...8c089af. Read the comment docs.

@imjasonh imjasonh merged commit 465eca2 into ko-build:main Oct 5, 2021
imjasonh added a commit to imjasonh/ko that referenced this pull request Oct 6, 2021
This reverts commit 465eca2.

This breaks pushing to quay.io.
imjasonh added a commit that referenced this pull request Oct 6, 2021
This reverts commit 465eca2.

This breaks pushing to quay.io.
@imjasonh imjasonh mentioned this pull request Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants