?:
| pipeline { | |
| agent none | |
| environment { | |
| AGENT_LABEL = 'builder' | |
| } | |
| stages { | |
| stage('Example') { | |
| agent { label "${AGENT_LABEL}" } | |
| steps { | |
| sh 'printenv' | |
| } | |
| } | |
| } | |
| } | |
| Resaults with: groovy.lang.MissingPropertyException: No such property: AGENT_LABEL for class: groovy.lang.Binding | |
| If I take any of the vars returned by "sh 'printenv'" command and use them as label - they work. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment