-
Bug
-
Resolution: Not A Defect
-
Minor
-
Windows Server 2012 R2
Jenkins: 2.60.2
Java: 1.8.0_66
config File Provider: 2.16.2
Whenever I try to use a parameter from a JSON file I'm only getting the name of the temp file that is copied to the workspace. Here is an example of usage and output:
configFileProvider([configFile(fileId: 'testFile', variable: 'TESTPARAM')]) {
bat "echo $env.TESTPARAM"
}
The output from this is:
C:\jenkins\TrustJenkinsPipeline\workspace@tmp\config4843133872643832765tmp
I have tried all of the following ways as well:
bat "echo $TESTPARAM"
bat "echo ${TESTPARAM}"
bat "echo ${env.TESTPARAM}"
bat "echo %TESTPARAM%"
bat "echo %env.TESTPARAM%"
All of them either return nothing or the same output as above.
Here is the contents of 'testFile':
{
"TESTPARAM": "testValue"
}
I do not know if this is a bug or me doing it wrong, but so far I haven't had any luck figuring it out.