-
Bug
-
Resolution: Not A Defect
-
Minor
-
None
-
Jenkins 2.252.
I declared the following var module in a shared pipeline library:
{{call(
GString msbuildloc,
GString arguments,
GString projloc,
GString projfile)}}
and invoke it from a declarative piplene with the following arguments:
{{gt_msbuild(
"C:
Program Files (x86)\\MSBuild\\14.0\\Bin
",
"${MSBUILD_PARAMS} /p:Configuration=Debug;Platform=AnyCPU;DotNetVer=${DotNetVer}",
"$ProjDir",
"Common.Encrypter.csproj")}}
The invocation fails with the following error:
{{No signature of method: gt_msbuild.call() is applicable for argument types:
( java.lang.String,
org.codehaus.groovy.runtime.GStringImpl,
org.codehaus.groovy.runtime.GStringImpl,
java.lang.String)}}
As you see, the percevied argument type of a double-quoted string depends on whether it contains actual interpolation or not. This is counterintuitive, incompatible with Groovy, and hard to work with. So much so that I consider it bug. Double-quoted string literals should treated consistently.