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 support for GitLab group variables #3894

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

robertohueso
Copy link

@robertohueso robertohueso commented Oct 1, 2024

Summary

This PR refactors pkg/cosign/git/gitlab/gitlab.go to make it work with both project variables and group variables. This is mainly used when running

cosign generate-key-pair gitlab://<path>

This solves #2914 for GitLab.

Release Note

  • GitLab go-cloud style URIs now work both projects and groups.

Documentation

This probably does not require any change in docs apart from the ones included in this PR.

getGitlabContext() function returns the GitLab API context (i.e. Project
or Group) for a 'ref' namespaced path.

This helps select which GitLab API context to use for each of the
requests.

See sigstore#2914

Signed-off-by: Roberto Hueso Gomez <[email protected]>
This refactors GitLab's GetSecret() function to make it work both for
projects and group namespaced 'ref' paths.

This function can get the value for any key, so there are no mentions to
particular variable keys.

See sigstore#2914

Signed-off-by: Roberto Hueso Gomez <[email protected]>
This refactors GitLab's PutSecret() function to make it work both for
projects and group namespaced 'ref' paths.

See sigstore#2914

Signed-off-by: Roberto Hueso Gomez <[email protected]>
This updates documentation to match group and project support when
generating key pairs for GitLab.

Signed-off-by: Roberto Hueso Gomez <[email protected]>
@robertohueso
Copy link
Author

Hi @cpanato, it's my first time contributing here, I think this should be ready to review, is there any additional change needed on my side? 😄

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.

1 participant