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(ko): support labels and creation times #3852

Merged
merged 4 commits into from
Mar 20, 2023

Conversation

maxbrunet
Copy link
Contributor

@maxbrunet maxbrunet commented Mar 9, 2023

@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 9, 2023
Copy link
Member

@caarlos0 caarlos0 left a comment

Choose a reason for hiding this comment

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

looks good overall.

I guess we should also check that the actual end image has the labels?

On Docker tests, line 54, we have a shouldFindImagesWithLabels which I think we can copy/edit as needed here...

Other than that, great work! Thanks for the PR 🙏

www/docs/customization/ko.md Show resolved Hide resolved
@pull-request-size pull-request-size bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 9, 2023
@maxbrunet

This comment was marked as resolved.

@developer-guy
Copy link
Member

lgtm, great catch, thanks for making this!

Copy link
Contributor Author

@maxbrunet maxbrunet left a comment

Choose a reason for hiding this comment

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

what I have done does not work

nvm, I confused labels which are in the config with manifest annotations


I added more tests for the labels, but also for the platforms and SBOM, and caught a bug!


I tried to use Bare: true for the tests to make the image reference easier to build, but I get an error:

publish: GET http://localhost:5052/v2/goreleasertest/testapp/blobs/uploads/: BLOB_UPLOAD_UNKNOWN: blob upload unknown to registry

No idea why it makes a GET request and not a POST 😕

internal/pipe/ko/ko.go Outdated Show resolved Hide resolved
@maxbrunet maxbrunet requested a review from caarlos0 March 10, 2023 03:19
@caarlos0
Copy link
Member

thanks! This looks good, will go out on v1.17 (by EOM).

@caarlos0 caarlos0 added the enhancement New feature or request label Mar 10, 2023
@codecov
Copy link

codecov bot commented Mar 10, 2023

Codecov Report

Merging #3852 (12ef6dc) into main (5327759) will increase coverage by 0.06%.
The diff coverage is 100.00%.

❗ Current head 12ef6dc differs from pull request most recent head 0d7139c. Consider uploading reports for the commit 0d7139c to get more accurate results

@@            Coverage Diff             @@
##             main    #3852      +/-   ##
==========================================
+ Coverage   83.34%   83.40%   +0.06%     
==========================================
  Files         123      123              
  Lines       10581    10620      +39     
==========================================
+ Hits         8819     8858      +39     
  Misses       1431     1431              
  Partials      331      331              
Impacted Files Coverage Δ
pkg/config/config.go 95.21% <ø> (ø)
internal/pipe/ko/ko.go 89.18% <100.00%> (+1.91%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@caarlos0 caarlos0 added this to the v1.17.0 milestone Mar 10, 2023
@maxbrunet maxbrunet changed the title feat(ko): support labels feat(ko): support labels and creation times Mar 11, 2023
@maxbrunet maxbrunet force-pushed the feat/ko/labels branch 2 times, most recently from a476aaa to 12ef6dc Compare March 11, 2023 22:17
@maxbrunet
Copy link
Contributor Author

@caarlos0 I added creation times too, let me know if it is ok with you 🙂

@maxbrunet maxbrunet requested a review from caarlos0 March 20, 2023 18:03
@caarlos0 caarlos0 merged commit c47315f into goreleaser:main Mar 20, 2023
@caarlos0
Copy link
Member

Thank you!

@maxbrunet maxbrunet deleted the feat/ko/labels branch March 20, 2023 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants