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

File credentials can't be used in Declarative environment variables


    • Similar Issues:


      Because we don't add credentials requiring a workspace (i.e., file credentials) to the environment at the initial resolution time, and because we actually process credentials for real after we populate the environment at runtime, an attempt to use the path of a file credential inside another environment variable fails. i.e.,

      environment {
        CREDENTIALS_PATH = credentials('MY_SECRET_FILE') // this should result in CREDENTIALS_PATH containing the path to the file
        ARGS = "--path=${CREDENTIALS_PATH}" // this should result in ARGS containing the path within CREDENTIALS_PATH

      will result in

      groovy.lang.MissingPropertyException: No such property: CREDENTIALS_PATH for class: groovy.lang.Binding

      This is nonoptimal and needs to be fixed somehow.


          Issue Links


            abayer Andrew Bayer created issue -
            abayer Andrew Bayer made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            abayer Andrew Bayer made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            abayer Andrew Bayer made changes -
            Remote Link This issue links to "PR #155 (Web Link)" [ 16313 ]
            abayer Andrew Bayer made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            bitwiseman Liam Newman made changes -
            Status Resolved [ 5 ] Closed [ 6 ]


              • Assignee:
                abayer Andrew Bayer
                abayer Andrew Bayer
              • Votes:
                1 Vote for this issue
                4 Start watching this issue


                • Created: