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

Enable access to credentials within CPS workflow scripts

      Workflow scripts need access to Jenkins credentials in order to execute deployments, interact with web services, etc.

      Ideally, a list of all credentials available to the current build would be exposed to workflow in the same way as 'env', allowing the script to choose the correct credential using fluent Groovy, for example:

      def token = credentials.find { it -> it.domain.name == 'HipChat.com' && it.username == 'bot' }
      

          [JENKINS-26299] Enable access to credentials within CPS workflow scripts

          Alexander Bertram created issue -

          Jesse Glick added a comment -

          There are problems with the suggested approach. I think this would be better handled via JENKINS-26051 and JENKINS-26099.

          Jesse Glick added a comment - There are problems with the suggested approach. I think this would be better handled via JENKINS-26051 and JENKINS-26099 .
          Jesse Glick made changes -
          Remote Link New: This issue links to "credentials-plugin 19 (Web Link)" [ 12004 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-26051 [ JENKINS-26051 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-26099 [ JENKINS-26099 ]

          Jesse Glick added a comment -

          Not taking this approach.

          Jesse Glick added a comment - Not taking this approach.
          Jesse Glick made changes -
          Assignee Original: Stephen Connolly [ stephenconnolly ] New: Alexander Bertram [ akbertram ]
          Resolution New: Won't Fix [ 2 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 160360 ] New: JNJira + In-Review [ 196401 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]

            akbertram Alexander Bertram
            akbertram Alexander Bertram
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: