I have been trying to tokens in my config file replaced with Environment
variables within a pipeline job.

Below is my JenkinsFile snippet

withEnv(['INSTANCE=Something']) {
        configFileProvider(
            [configFile(fileId: 'prescribe', variable: 'DEPLOY_FILE')]) {
            sh "echo $env.INSTANCE"
            sh "cat ${env.DEPLOY_FILE}"
        }
   }

And my config file provider file, I have tried  possible combinations that
came to my mind. Also tried adding a global parameter INSTANCE.

${ENV, var=INSTANCE}
${ENV.INSTANCE}
${env,var=INSTANCE}
${env, var=INSTANCE}
${INSTANCE}

None of the above seems to do the trick. And I have the file without
replaced tokens.

Any help will be greatly appreciated

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CANnAV1faS1AiUnzDCq6RyaHceDhY7%2B0SpMAh66eDGMD5%3DnTW6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to