Add support for GitLab group variables#3894
Closed
robertohueso wants to merge 4 commits intosigstore:mainfrom
Closed
Add support for GitLab group variables#3894robertohueso wants to merge 4 commits intosigstore:mainfrom
robertohueso wants to merge 4 commits intosigstore:mainfrom
Conversation
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 <roberto@robertohueso.org>
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 <roberto@robertohueso.org>
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 <roberto@robertohueso.org>
This updates documentation to match group and project support when generating key pairs for GitLab. Signed-off-by: Roberto Hueso Gomez <roberto@robertohueso.org>
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? 😄 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3894 +/- ##
==========================================
- Coverage 40.10% 36.44% -3.67%
==========================================
Files 155 203 +48
Lines 10044 12881 +2837
==========================================
+ Hits 4028 4694 +666
- Misses 5530 7604 +2074
- Partials 486 583 +97 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
sorry for the delay here @robertohueso please check the lint job and fix the lint issues |
Contributor
|
Closing as we push out a v3 release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR refactors
pkg/cosign/git/gitlab/gitlab.goto make it work with both project variables and group variables. This is mainly used when runningThis solves #2914 for GitLab.
Release Note
Documentation
This probably does not require any change in docs apart from the ones included in this PR.