-
Bug
-
Resolution: Fixed
-
Minor
I'm trying to access "BRANCH_NAME" variable in "TEST" pipeline environment function parameters:
@Library('manala') _ pipeline { agent { docker 'manala/hugo' } environment { TEST = manalaDomainize("${env.BRANCH_NAME}") } stages { stage('Test') { steps { sh "echo $TEST" } } } }
This breaks the build, returning:
groovy.lang.MissingPropertyException: No such property: TEST for class: groovy.lang.Binding
Without success, i've tried different syntaxes:
TEST = manalaDomainize("$BRANCH_NAME") TEST = manalaDomainize("${BRANCH_NAME}") TEST = manalaDomainize("${env.BRANCH_NAME}") TEST = manalaDomainize(env.BRANCH_NAME) TEST = manalaDomainize(BRANCH_NAME)
Of course, manalaDomainize() is a valid function, and everything is ok when i provide a simple string such as "foo".
- depends on
-
JENKINS-42753 Generate runtime model directly from AST model
- Closed