-
Notifications
You must be signed in to change notification settings - Fork 13
Add secret variables expansion from CNode value #3
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
Open
ziouf
wants to merge
9
commits into
jenkinsci:master
Choose a base branch
from
ziouf:feature/add-secrets-expansion-in-yaml
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8dc7868
Add secret variables expansion from CNode value
ziouf 9f64797
Add demo file for variable/secret expansion feature as requested
ziouf 567e63f
Merge branch 'master' into feature/add-secrets-expansion-in-yaml
jetersen 8609c45
use ordinal -60 to load after JobDSL JCasC configurator
jetersen 6c1c678
bump parent pom, jenkins core and jcasc
jetersen 316f5bf
fix deprecated method and improve readability
jetersen c5cc527
update Jenkinsfile
jetersen 9fee9aa
add test
jetersen 7d88783
Merge branch 'master' into feature/add-secrets-expansion-in-yaml
jetersen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
# Using jCasC secret expansion feature | ||
# Secrets are loaded from : | ||
# - Docker secrets | ||
# - Kubernetes/Openshift secrets | ||
# - HashiCorp Vault | ||
# - Environment variables | ||
# | ||
# cf: https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/docs/features/secrets.adoc | ||
|
||
groovy: | ||
|
||
# Asuming secret value is stored in variable named API_KEY | ||
- url: https://my.web.site.com/path/to/my/resource?api_key=${API_KEY} | ||
# Same with basic auth example | ||
- url: https://${USER}:${PASS}@my.web.site.com/path/to/my/resource | ||
|
||
# Asuming secret value is stored in variable named SECRET | ||
- script: > | ||
println "Displaying my secret : ${SECRET}"; |
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest bumping to 1.42 as ordinal was fixed in 1.41 and secret resolver was improved in 1.42
Parent pom should be bumped as well