-
Bug
-
Resolution: Fixed
-
Minor
-
Pipeline: Model Definition 1.1.4
I have a parameter called JDK_TOOL and would like to use the parameter inside of my declarative pipeline tools definition but this script does not work:
pipeline { agent any tools { jdk "${params.JDK_TOOL}" } stages { stage('Example') { steps { sh 'jdk --version' } } } }
I get an error which says:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 7: Tool type "jdk" does not have an install of ""${params.JDK_TOOL}"" configured - did you mean "TEST2"? @ line 7, column 5. jdk "${params.JDK_TOOL}"
so it does not seem to actually parse the variable at all(and adds the " as well)
- links to
[JENKINS-44497] Tools should allow variables in their names for declarative pipeline
Labels | New: declarative-variable-and-method-resolution |
Epic Link |
New:
|
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Remote Link | New: This issue links to "PR #190 (Web Link)" [ 17616 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: In Review [ 10005 ] | New: Resolved [ 5 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |