Support environment variables in global tags and global job tags#190
Conversation
FlorianVeaux
left a comment
There was a problem hiding this comment.
Great PR and great testing 👏
This only supports env variables that were defined on the master jenkins agent. But this seems to be fine and more practical than using the env vars on the agent(s).
Let's add a comment on the jenkins UI and on the ReadMe that explains that env vars are supported for global tags and global job tags but that they refer to env vars of the controller (i.e master).
|
Hi @luisgonzalex jobA, label:$LABEL The value of this tag is always _label What am I missing here? |
|
Hi @sukanyasuresh
Hope this helps! |
What does this PR do?
Add support for environment variables in global job tags as per Issue 54. Support for environment variables in the global tags field was also added. The assumption is that env vars used in these fields refer to env vars configured on the
masterjenkins agent.Description of the Change
There are two cases.
EnvVars.masterEnvVarsto access the environment variablesAlternate Designs
Possible Drawbacks
This only supports env variables that were defined on the master jenkins agent. But this seems to be fine and more practical than using the env vars on the agent(s).
Verification Process
Additional Notes
Release Notes
Review checklist (to be filled by reviewers)
changelog/label attached. If applicable it should have thebackward-incompatiblelabel attached.do-not-merge/label attached.kind/andseverity/labels attached at least.