-
Bug
-
Resolution: Duplicate
-
Major
I have a shell step that I use to get the tool location and execute the tool in a single step that relies on interpolation:
sh "${tool 'gradle32'}/bin/gradle build"
Entering this step in through a standard editor into a Jenkinsfile / declarative pipeline works fine and runs as expected, substituting the path defined globally for 'gradle32'.
However, entering this exact same text in a shell step in the Blue Ocean pipeline editor (even copying it verbatim), saving and attempting to run it results in a "Bad substitution" error from the step.
Looking at the shell command in the blue ocean pipeline editor for both the case where it was entered outside the editor and entered directly in the shell step in the editor shows the exact same syntax in both.
Apparently, when you enter the step directly in through the editor, it translates it into this (as evidenced by the Jenkinsfile it produced):
sh '"${tool \'gradle32\'}/bin/gradle build"'
- duplicates
-
JENKINS-41548 Unable to use double quotes and round trip with them
-
- Closed
-
I believe this is a duplicate of
JENKINS-41548.Thanks for reporting.