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

credentials('some-id') should support Secret Zip type of credentials

XMLWordPrintable

      Instead of uploading a secret file, one can upload a zip file which is treated differently on usage.

      In essence, creation of the credential is just "Secret File" but when using the credential in withCredentials one either uses "Secret File" or "Secret ZIP File" in the snippet generator.

      A Declarative Pipeline does not expand the ZIP file correctly when it access the credential via:

      pipeline {
        environment {
          THING = credentials('my-zip-file-id')
        }
      }
      

      As best as I can tell, the file is being referenced, but it's not being unzipped into a temporary directory the way the following snippet might:

              withCredentials([zip(credentialsId: 'docker-config',
                                        variable: 'DOCKER_CONFIG')]) {
               }
      

            Unassigned Unassigned
            rtyler R. Tyler Croy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: