Following instructions on https://github.com/openshift/jenkins-client-plugin#moving-images-cluster-to-cluster, I am unable to promote the image between two openshift clusters as it throws an authentication issue.

      Adding a sleep after the two withDockerRegistry calls, I can see that two folders are created under the <jobname>@TMP directory (unique names for each) with a config.json under each of them - these contain the authentication details to the respective registries.

       

      Docker-commons-plugin version: 1.15

      Docker plugin version: 1.1.7

      Openshift Client plugin version: 1.0.31 (openshift client and docker registry version: 3.7.119)

      Jenkins: 2.176.2

       

      [Pipeline] { (Copy from source to dest)
      [Pipeline] script
      [Pipeline] {
      [Pipeline] withDockerRegistry
      $ docker login -u openshift/skopeo -p ******** https://docker-registry-default.<redacted>
      Login Succeeded
      [Pipeline] {
      [Pipeline] withDockerRegistry
      $ docker login -u ci-cd/jenkins -p ******** https://docker-registry.<redacted>
      Login Succeeded
      [Pipeline] {
      [Pipeline] sh
      + /bin/oc image mirror --insecure=true docker-registry.<redacted>/appversion/appversion:latest docker-registry-default.<redacted>/appversion/appversion:latest
      error: unable to retrieve source image docker-registry.<redacted>/appversion/appversion by tag: unauthorized: authentication required
      [Pipeline] }
      [Pipeline] // withDockerRegistry
      [Pipeline] }
      [Pipeline] // withDockerRegistry
      [Pipeline] }
      [Pipeline] // script
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // withEnv
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      ERROR: script returned exit code 1
      Finished: FAILURE
      

          [JENKINS-58837] withDockerRegistry on multiple clusters

          Paul Clark created issue -
          Paul Clark made changes -
          Description Original: Following instructions on [https://github.com/openshift/jenkins-client-plugin#moving-images-cluster-to-cluster], I am unable to promote the image between two openshift clusters as it throws an authentication issue.

          Adding a sleep after the two withDockerRegistry calls, I can see that two folders are created under the <jobname>@TMP directory (unique names for each) with a config.json under each of them - these contain the authentication details to the respective registries.

           

          Docker-commons-plugin version: 1.15

          Docker plugin version: 1.1.7

          Openshift Client plugin version: 1.0.31 (openshift client and docker registry version: 3.7.119)

          Jenkins: 2.176.2

           
          [Pipeline] { (Copy from source to dest)[Pipeline] script[Pipeline] {[Pipeline] withDockerRegistry$ docker login -u openshift/skopeo -p ******** [https://docker-registry-default.&lt;redacted>|https://docker-registry-default.infra.ocp-reg.hbs.net.au/]Login Succeeded[Pipeline] {[Pipeline] withDockerRegistry$ docker login -u ci-cd/jenkins -p ******** [https://docker-registry.&lt;redacted>|https://docker-registry.apps.ocp-tst.hbs.net.au/]Login Succeeded[Pipeline] {[Pipeline] sh+ /bin/oc image mirror --insecure=true docker-registry.<redacted>/appversion/appversion:latest docker-registry-default.<redacted>/appversion/appversion:latest
          error: unable to retrieve source image docker-registry.<redacted>/appversion/appversion by tag: unauthorized: authentication required[Pipeline] }[Pipeline] // withDockerRegistry[Pipeline] }[Pipeline] // withDockerRegistry[Pipeline] }[Pipeline] // script[Pipeline] }[Pipeline] // stage[Pipeline] }[Pipeline] // withEnv[Pipeline] }[Pipeline] // node
           
          New: Following instructions on [https://github.com/openshift/jenkins-client-plugin#moving-images-cluster-to-cluster], I am unable to promote the image between two openshift clusters as it throws an authentication issue.

          Adding a sleep after the two withDockerRegistry calls, I can see that two folders are created under the <jobname>@TMP directory (unique names for each) with a config.json under each of them - these contain the authentication details to the respective registries.

           

          Docker-commons-plugin version: 1.15

          Docker plugin version: 1.1.7

          Openshift Client plugin version: 1.0.31 (openshift client and docker registry version: 3.7.119)

          Jenkins: 2.176.2

           
          {code:java}
          [Pipeline] { (Copy from source to dest)
          [Pipeline] script
          [Pipeline] {
          [Pipeline] withDockerRegistry
          $ docker login -u openshift/skopeo -p ******** https://docker-registry-default.&lt;redacted>
          Login Succeeded
          [Pipeline] {
          [Pipeline] withDockerRegistry
          $ docker login -u ci-cd/jenkins -p ******** https://docker-registry.&lt;redacted>
          Login Succeeded
          [Pipeline] {
          [Pipeline] sh
          + /bin/oc image mirror --insecure=true docker-registry.<redacted>/appversion/appversion:latest docker-registry-default.<redacted>/appversion/appversion:latest
          error: unable to retrieve source image docker-registry.<redacted>/appversion/appversion by tag: unauthorized: authentication required
          [Pipeline] }
          [Pipeline] // withDockerRegistry
          [Pipeline] }
          [Pipeline] // withDockerRegistry
          [Pipeline] }
          [Pipeline] // script
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] }
          [Pipeline] // withEnv
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          ERROR: script returned exit code 1
          Finished: FAILURE
          {code}
          pjdarton made changes -
          Component/s New: docker-workflow-plugin [ 20625 ]
          Component/s Original: docker-plugin [ 18724 ]
          Mark Waite made changes -
          Assignee Original: Nicolas De Loof [ ndeloof ]

            Unassigned Unassigned
            clarkster Paul Clark
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: