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

Enable access to credentials within CPS workflow scripts

    Details

    • Similar Issues:

      Description

      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' }
      

        Attachments

          Issue Links

            Activity

            akbertram Alexander Bertram created issue -
            Hide
            jglick 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.

            Show
            jglick 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 .
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Remote Link This issue links to "credentials-plugin 19 (Web Link)" [ 12004 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-26051 [ JENKINS-26051 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-26099 [ JENKINS-26099 ]
            Hide
            jglick Jesse Glick added a comment -

            Not taking this approach.

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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: