Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39998

Token expansion of a config file not happening

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      Jenkins version : 2.7.1
      Config file provider plugin : 2.13
    • Similar Issues:

      Description

      I have a config file with some tokens that I expected to be replaced when used with a buildWrapper. But this did not work for me. My pipeline reads like

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

      And my 'prescribe' id'ed file looks like

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

      However the file does not come out as token replaced. I have also tried providing INSTANCE as a global password and global variable with the same result

        Attachments

          Activity

            People

            • Assignee:
              domi Dominik Bartholdi
              Reporter:
              sathyakumars Sathyakumar Seshachalam
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: