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

Add Buildkite provider #2779

Merged
merged 2 commits into from Mar 9, 2023
Merged

Conversation

haydentherapper
Copy link
Contributor

@haydentherapper haydentherapper commented Mar 8, 2023

Inspired by
https://github.com/buildkite/agent/blob/main/clicommand/oidc_request_token.go, this should replicate the logic used when calling
'buildkite-agent oidc request-token'

Fixes #2778

Summary

Release Note

Added provider for Buildkite CI. Identity tokens will be automatically fetched when signing on Buildkite.

Documentation

Inspired by
https://github.com/buildkite/agent/blob/main/clicommand/oidc_request_token.go,
this should replicate the logic used when calling
'buildkite-agent oidc request-token'

Fixes sigstore#2778

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
mattmoor
mattmoor previously approved these changes Mar 8, 2023
Copy link
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

Awesome 🤩

Comment on lines 51 to 52
l := logger.NewConsoleLogger(logger.NewTextPrinter(os.Stderr), os.Exit)
l.SetLevel(logger.INFO)
Copy link
Member

Choose a reason for hiding this comment

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

Does this log anything? Perhaps have this package put the default log level in a global variable, so folks can change it if this is noisy?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea! There was an existing environment variable, I've plumbed that through to the logger.

@codecov
Copy link

codecov bot commented Mar 8, 2023

Codecov Report

Merging #2779 (471b1bc) into main (2670ed3) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #2779   +/-   ##
=======================================
  Coverage   29.54%   29.54%           
=======================================
  Files         151      151           
  Lines        9646     9646           
=======================================
  Hits         2850     2850           
  Misses       6357     6357           
  Partials      439      439           
Impacted Files Coverage Δ
pkg/cosign/env/env.go 88.88% <ø> (ø)

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

@joemiller
Copy link
Contributor

joemiller commented Mar 9, 2023

I built a binary w/ this branch (specifically commit 88db6a7) and successfully tested it in a buildkite pipeline with cosign sign <image>! 👍

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

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

can you add a release note for when we release make this a highligth?

thanks
besides that lgtm
thanks for that

@haydentherapper
Copy link
Contributor Author

can you add a release note for when we release make this a highligth?

done

@cpanato cpanato merged commit 6ca4ffd into sigstore:main Mar 9, 2023
@github-actions github-actions bot added this to the v1.14.0 milestone Mar 9, 2023
dmitris pushed a commit to dmitris/cosign that referenced this pull request Mar 24, 2023
* Add Buildkite provider

Inspired by
https://github.com/buildkite/agent/blob/main/clicommand/oidc_request_token.go,
this should replicate the logic used when calling
'buildkite-agent oidc request-token'

Fixes sigstore#2778

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>

* Support customizing log level based on env var

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>

---------

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
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.

Add Buildkite provider
4 participants