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

Credentials Binding Plugin: File type intermittent permissions issue

XMLWordPrintable

      We have a secrets file that is injected via withCredentials, the pipeline script is below.

      If this is run, it randomly succeeds or fails and is not consistent. When it fails, it appears that the directory it is using to reference the secrets file is not the primary workspace but a "tmp" directory.

      I tried multiple variants including clearing the workspace, putting it in a sub directory etc. but it still intermittently fails. Is there something wrong in the snippet below?

      node {
       withCredentials([file(credentialsId: 'test-confidential', variable: 'FILE')]) {
       def list = new XmlParser().parse(FILE)
       echo list.toString()
       }
      }

      I also noticed an (unanswered) stackoverflow post from 15 hours ago that appears to be something similar.

      Environment info:

      Jenkins LTS 2.73.2
      Credentials Binding Plugin 1.13
      Credentials Plugin 2.1.16

        1. failure.log
          5 kB
          Thiyag Krishna
        2. success.log
          0.4 kB
          Thiyag Krishna

            Unassigned Unassigned
            thiyag Thiyag Krishna
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: