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

withDockerRegistry only allows one registry

    Details

    • Similar Issues:

      Description

      I have a script that requires two Docker registries (build image1, push to registry 1, build image2 that relies on image1, push to registry 2).

      I am unable to authenticate with two registries at once using withDockerRegistry. withDockerRegistry only takes one registry argument and if you attempt to nest withDockerRegistry steps, only the innermost registry is authenticated with.

      This doesn't work (only registry2 works):

      withDockerRegistry(<registry1>) {
          withDockerRegistry(<registry2>) {
              sh `my-script.sh`
          }
      }
      

      withDockerRegistry should take an arbitrary amount of registries as arguments:

      withDockerRegistry([<registry1>, <registry2>]) {
          sh 'my-script.sh'
      }
      

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              frechetta93 Eric Frechette
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: