Add GitLab CI/CD secrets adapter#1821
Open
felixbuenemann wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new gitlab-ci secrets adapter that fetches GitLab CI/CD project variables via the glab CLI, supporting environment scoping (--from) with wildcard (*) fallback and pagination.
Changes:
- Added
Kamal::Secrets::Adapters::GitlabCiimplementation that lists variables viaglab variable listand resolves scoped vs wildcard precedence. - Added a dedicated Minitest suite covering scoped fetches, wildcard-only behavior, pagination, and failure modes.
- Updated adapter lookup to accept the
gitlab-ciadapter name.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
lib/kamal/secrets/adapters/gitlab_ci.rb |
Implements the GitLab CI/CD variables adapter using glab, including pagination and scoped resolution logic. |
test/secrets/gitlab_ci_adapter_test.rb |
Adds adapter tests for scoped fetch, wildcard behavior, pagination, and error cases. |
lib/kamal/secrets/adapters.rb |
Adds gitlab-ci name normalization to load the new adapter. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9fd2160 to
82bb9f4
Compare
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
Adds a secrets adapter for GitLab CI/CD project variables using the
glabCLI.glab variable listwith pagination support--fromto select an environment scope (e.g.staging,production), falling back to wildcard (*) scoped variablesUsage
Test plan