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

nested docker.withRegistry() does not work

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      With the previous behavior of docker-workflow-plugin (1.15) I was able to nest my `docker.withRegistry()` calls so I can access numerous registries at the same time.

      Example: 

      node('docker') {
          docker.withRegistry('https://repo1.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
              docker.withRegistry('https://repo2.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                  sh('docker pull repo1/library/image:latest')
                  sh('docker pull repo2/libraryimage:latest')
              }
          }
      }
      

      From the output it looks like each credential is stored in it's own file per registry. My assumption is that with nested logins, it should be in the same credential store/file?

      Is there any workaround for this?

       

        Attachments

          Activity

          arty13 Art V created issue -
          arty13 Art V made changes -
          Field Original Value New Value
          Description With the previous behavior of docker-workflow-plugin (1.15) I was able to nest my `docker.withRegistry()` calls so I can access numerous registries at the same time.

          Example: 
          {code:java}
          node('docker') {
              docker.withRegistry('https://repo1.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                  docker.withRegistry('https://repo2.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                      sh('docker pull repo1/library/image:latest')
                      sh('docker pull repo2/libraryimage:latest')
                  }
              }
          }
          {code}

          From the output it looks like each credential is stored in it's own file per registry. My assumption is that with nested logins, it should be in the same credential store/file?

          Is there any workaround for this?
          With the previous behavior of docker-workflow-plugin (1.15) I was able to nest my `docker.withRegistry()` calls so I can access numerous registries at the same time.

          Example: 
          {code:java}
          node('docker') {
              docker.withRegistry('https://repo1.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                  docker.withRegistry('https://repo2.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                      sh('docker pull repo1/library/image:latest')
                      sh('docker pull repo2/libraryimage:latest')
                  }
              }
          }
          {code}
          From the output it looks like each credential is stored in it's own file per registry. My assumption is that with nested logins, it should be in the same credential store/file?

          Is there any workaround for this?

           

          ** Update – after more investigation – think this is more related to the docker-commons plugin - think it's related to this MR: [https://github.com/jenkinsci/docker-workflow-plugin/pull/140/files]
          This MR introduced the env variables - specifically `DOCKER_CONFIG`
          arty13 Art V made changes -
          Component/s docker-commons-plugin [ 20628 ]
          arty13 Art V made changes -
          Environment Jenkins 2.190.1
          docker-workflow-plugin 1.21
          Jenkins 2.190.1
          docker-workflow-plugin 1.21
          docker-commons 1.15
          arty13 Art V made changes -
          Issue Type Task [ 3 ] Bug [ 1 ]
          arty13 Art V made changes -
          Description With the previous behavior of docker-workflow-plugin (1.15) I was able to nest my `docker.withRegistry()` calls so I can access numerous registries at the same time.

          Example: 
          {code:java}
          node('docker') {
              docker.withRegistry('https://repo1.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                  docker.withRegistry('https://repo2.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                      sh('docker pull repo1/library/image:latest')
                      sh('docker pull repo2/libraryimage:latest')
                  }
              }
          }
          {code}
          From the output it looks like each credential is stored in it's own file per registry. My assumption is that with nested logins, it should be in the same credential store/file?

          Is there any workaround for this?

           

          ** Update – after more investigation – think this is more related to the docker-commons plugin - think it's related to this MR: [https://github.com/jenkinsci/docker-workflow-plugin/pull/140/files]
          This MR introduced the env variables - specifically `DOCKER_CONFIG`
          With the previous behavior of docker-workflow-plugin (1.15) I was able to nest my `docker.withRegistry()` calls so I can access numerous registries at the same time.

          Example: 
          {code:java}
          node('docker') {
              docker.withRegistry('https://repo1.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                  docker.withRegistry('https://repo2.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                      sh('docker pull repo1/library/image:latest')
                      sh('docker pull repo2/libraryimage:latest')
                  }
              }
          }
          {code}
          From the output it looks like each credential is stored in it's own file per registry. My assumption is that with nested logins, it should be in the same credential store/file?

          Is there any workaround for this?

           

          * Update – after more investigation – think this is more related to the docker-commons plugin - think it's related to this MR: [https://github.com/jenkinsci/docker-workflow-plugin/pull/140/files]
           This MR introduced the env variables - specifically `DOCKER_CONFIG`

          ** Update – further investigation – there has been an update to docker-commons-plugin that fixed this issue with https://issues.jenkins-ci.org/browse/JENKINS-52737
          Made a MR for to use the latest docker-commons: [https://github.com/jenkinsci/docker-workflow-plugin/pull/193]
          arty13 Art V made changes -
          Description With the previous behavior of docker-workflow-plugin (1.15) I was able to nest my `docker.withRegistry()` calls so I can access numerous registries at the same time.

          Example: 
          {code:java}
          node('docker') {
              docker.withRegistry('https://repo1.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                  docker.withRegistry('https://repo2.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                      sh('docker pull repo1/library/image:latest')
                      sh('docker pull repo2/libraryimage:latest')
                  }
              }
          }
          {code}
          From the output it looks like each credential is stored in it's own file per registry. My assumption is that with nested logins, it should be in the same credential store/file?

          Is there any workaround for this?

           

          * Update – after more investigation – think this is more related to the docker-commons plugin - think it's related to this MR: [https://github.com/jenkinsci/docker-workflow-plugin/pull/140/files]
           This MR introduced the env variables - specifically `DOCKER_CONFIG`

          ** Update – further investigation – there has been an update to docker-commons-plugin that fixed this issue with https://issues.jenkins-ci.org/browse/JENKINS-52737
          Made a MR for to use the latest docker-commons: [https://github.com/jenkinsci/docker-workflow-plugin/pull/193]
          With the previous behavior of docker-workflow-plugin (1.15) I was able to nest my `docker.withRegistry()` calls so I can access numerous registries at the same time.

          Example: 
          {code:java}
          node('docker') {
              docker.withRegistry('https://repo1.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                  docker.withRegistry('https://repo2.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                      sh('docker pull repo1/library/image:latest')
                      sh('docker pull repo2/libraryimage:latest')
                  }
              }
          }
          {code}
          From the output it looks like each credential is stored in it's own file per registry. My assumption is that with nested logins, it should be in the same credential store/file?

          Is there any workaround for this?

           
           * Update – after more investigation – think this is more related to the docker-commons plugin - think it's related to this MR: [https://github.com/jenkinsci/docker-workflow-plugin/pull/140/files]
           This MR introduced the env variables - specifically `DOCKER_CONFIG`

           
           * Update – further investigation – there has been an update to docker-commons-plugin that fixed this issue with https://issues.jenkins-ci.org/browse/JENKINS-52737
           Made a MR for to use the latest docker-commons: [https://github.com/jenkinsci/docker-workflow-plugin/pull/193]
          arty13 Art V made changes -
          Description With the previous behavior of docker-workflow-plugin (1.15) I was able to nest my `docker.withRegistry()` calls so I can access numerous registries at the same time.

          Example: 
          {code:java}
          node('docker') {
              docker.withRegistry('https://repo1.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                  docker.withRegistry('https://repo2.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                      sh('docker pull repo1/library/image:latest')
                      sh('docker pull repo2/libraryimage:latest')
                  }
              }
          }
          {code}
          From the output it looks like each credential is stored in it's own file per registry. My assumption is that with nested logins, it should be in the same credential store/file?

          Is there any workaround for this?

           
           * Update – after more investigation – think this is more related to the docker-commons plugin - think it's related to this MR: [https://github.com/jenkinsci/docker-workflow-plugin/pull/140/files]
           This MR introduced the env variables - specifically `DOCKER_CONFIG`

           
           * Update – further investigation – there has been an update to docker-commons-plugin that fixed this issue with https://issues.jenkins-ci.org/browse/JENKINS-52737
           Made a MR for to use the latest docker-commons: [https://github.com/jenkinsci/docker-workflow-plugin/pull/193]
          With the previous behavior of docker-workflow-plugin (1.15) I was able to nest my `docker.withRegistry()` calls so I can access numerous registries at the same time.

          Example: 
          {code:java}
          node('docker') {
              docker.withRegistry('https://repo1.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                  docker.withRegistry('https://repo2.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                      sh('docker pull repo1/library/image:latest')
                      sh('docker pull repo2/libraryimage:latest')
                  }
              }
          }
          {code}
          From the output it looks like each credential is stored in it's own file per registry. My assumption is that with nested logins, it should be in the same credential store/file?

          Is there any workaround for this?

           
           * Update – after more investigation – think this is more related to the docker-commons plugin - think it's related to this MR: [https://github.com/jenkinsci/docker-workflow-plugin/pull/140/files]
           This MR introduced the env variables - specifically `DOCKER_CONFIG`

           
           * -Update – further investigation – there has been an update to docker-commons-plugin that fixed this issue with https://issues.jenkins-ci.org/browse/JENKINS-52737-
           -Made a MR for to use the latest docker-commons:- [-https://github.com/jenkinsci/docker-workflow-plugin/pull/193-]
           * Update – Fixes need on the docker-commons logic. MR here: [https://github.com/jenkinsci/docker-commons-plugin/pull/82]
          arty13 Art V made changes -
          Assignee Jesse Glick [ jglick ]
          arty13 Art V made changes -
          Description With the previous behavior of docker-workflow-plugin (1.15) I was able to nest my `docker.withRegistry()` calls so I can access numerous registries at the same time.

          Example: 
          {code:java}
          node('docker') {
              docker.withRegistry('https://repo1.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                  docker.withRegistry('https://repo2.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                      sh('docker pull repo1/library/image:latest')
                      sh('docker pull repo2/libraryimage:latest')
                  }
              }
          }
          {code}
          From the output it looks like each credential is stored in it's own file per registry. My assumption is that with nested logins, it should be in the same credential store/file?

          Is there any workaround for this?

           
           * Update – after more investigation – think this is more related to the docker-commons plugin - think it's related to this MR: [https://github.com/jenkinsci/docker-workflow-plugin/pull/140/files]
           This MR introduced the env variables - specifically `DOCKER_CONFIG`

           
           * -Update – further investigation – there has been an update to docker-commons-plugin that fixed this issue with https://issues.jenkins-ci.org/browse/JENKINS-52737-
           -Made a MR for to use the latest docker-commons:- [-https://github.com/jenkinsci/docker-workflow-plugin/pull/193-]
           * Update – Fixes need on the docker-commons logic. MR here: [https://github.com/jenkinsci/docker-commons-plugin/pull/82]
          With the previous behavior of docker-workflow-plugin (1.15) I was able to nest my `docker.withRegistry()` calls so I can access numerous registries at the same time.

          Example: 
          {code:java}
          node('docker') {
              docker.withRegistry('https://repo1.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                  docker.withRegistry('https://repo2.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                      sh('docker pull repo1/library/image:latest')
                      sh('docker pull repo2/libraryimage:latest')
                  }
              }
          }
          {code}
          From the output it looks like each credential is stored in it's own file per registry. My assumption is that with nested logins, it should be in the same credential store/file?

          Is there any workaround for this?

           
           * Update – after more investigation – think this is more related to the docker-commons plugin - think it's related to this MR: [https://github.com/jenkinsci/docker-workflow-plugin/pull/140/files]
           This MR introduced the env variables - specifically `DOCKER_CONFIG`

           
           * --Update – further investigation – there has been an update to docker-commons-plugin that fixed this issue with- -https://issues.jenkins-ci.org/browse/JENKINS-52737--
           -Made a MR for to use the latest docker-commons:- -[-https://github.com/jenkinsci/docker-workflow-plugin/pull/193-]-
           * Update – Fixes need on the docker-commons logic. MR here: [https://github.com/jenkinsci/docker-commons-plugin/pull/82]
          arty13 Art V made changes -
          Description With the previous behavior of docker-workflow-plugin (1.15) I was able to nest my `docker.withRegistry()` calls so I can access numerous registries at the same time.

          Example: 
          {code:java}
          node('docker') {
              docker.withRegistry('https://repo1.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                  docker.withRegistry('https://repo2.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                      sh('docker pull repo1/library/image:latest')
                      sh('docker pull repo2/libraryimage:latest')
                  }
              }
          }
          {code}
          From the output it looks like each credential is stored in it's own file per registry. My assumption is that with nested logins, it should be in the same credential store/file?

          Is there any workaround for this?

           
           * Update – after more investigation – think this is more related to the docker-commons plugin - think it's related to this MR: [https://github.com/jenkinsci/docker-workflow-plugin/pull/140/files]
           This MR introduced the env variables - specifically `DOCKER_CONFIG`

           
           * --Update – further investigation – there has been an update to docker-commons-plugin that fixed this issue with- -https://issues.jenkins-ci.org/browse/JENKINS-52737--
           -Made a MR for to use the latest docker-commons:- -[-https://github.com/jenkinsci/docker-workflow-plugin/pull/193-]-
           * Update – Fixes need on the docker-commons logic. MR here: [https://github.com/jenkinsci/docker-commons-plugin/pull/82]
          With the previous behavior of docker-workflow-plugin (1.15) I was able to nest my `docker.withRegistry()` calls so I can access numerous registries at the same time.

          Example: 
          {code:java}
          node('docker') {
              docker.withRegistry('https://repo1.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                  docker.withRegistry('https://repo2.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                      sh('docker pull repo1/library/image:latest')
                      sh('docker pull repo2/libraryimage:latest')
                  }
              }
          }
          {code}
          From the output it looks like each credential is stored in it's own file per registry. My assumption is that with nested logins, it should be in the same credential store/file?

          Is there any workaround for this?

           
           * -Update – after more investigation – think this is more related to the docker-commons plugin - think it's related to this MR: [https://github.com/jenkinsci/docker-workflow-plugin/pull/140/files]-
           -This MR introduced the env variables - specifically `DOCKER_CONFIG`-
           * --Update – further investigation – there has been an update to docker-commons-plugin that fixed this issue with- -https://issues.jenkins-ci.org/browse/JENKINS-52737--
           -Made a MR for to use the latest docker-commons:- -[-https://github.com/jenkinsci/docker-workflow-plugin/pull/193-]-
           * Update – Fixes need on the docker-commons logic. MR here: [https://github.com/jenkinsci/docker-commons-plugin/pull/82]
          arty13 Art V made changes -
          Description With the previous behavior of docker-workflow-plugin (1.15) I was able to nest my `docker.withRegistry()` calls so I can access numerous registries at the same time.

          Example: 
          {code:java}
          node('docker') {
              docker.withRegistry('https://repo1.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                  docker.withRegistry('https://repo2.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                      sh('docker pull repo1/library/image:latest')
                      sh('docker pull repo2/libraryimage:latest')
                  }
              }
          }
          {code}
          From the output it looks like each credential is stored in it's own file per registry. My assumption is that with nested logins, it should be in the same credential store/file?

          Is there any workaround for this?

           
           * -Update – after more investigation – think this is more related to the docker-commons plugin - think it's related to this MR: [https://github.com/jenkinsci/docker-workflow-plugin/pull/140/files]-
           -This MR introduced the env variables - specifically `DOCKER_CONFIG`-
           * --Update – further investigation – there has been an update to docker-commons-plugin that fixed this issue with- -https://issues.jenkins-ci.org/browse/JENKINS-52737--
           -Made a MR for to use the latest docker-commons:- -[-https://github.com/jenkinsci/docker-workflow-plugin/pull/193-]-
           * Update – Fixes need on the docker-commons logic. MR here: [https://github.com/jenkinsci/docker-commons-plugin/pull/82]
          With the previous behavior of docker-workflow-plugin (1.15) I was able to nest my `docker.withRegistry()` calls so I can access numerous registries at the same time.

          Example: 
          {code:java}
          node('docker') {
              docker.withRegistry('https://repo1.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                  docker.withRegistry('https://repo2.private.com', '5d243c54-3d2c-42e3-9c3d-35c1cbe61ddd') {
                      sh('docker pull repo1/library/image:latest')
                      sh('docker pull repo2/libraryimage:latest')
                  }
              }
          }
          {code}
          From the output it looks like each credential is stored in it's own file per registry. My assumption is that with nested logins, it should be in the same credential store/file?

          Is there any workaround for this?

           
           * -Update – after more investigation – think this is more related to the docker-commons plugin - think it's related to this MR: [https://github.com/jenkinsci/docker-workflow-plugin/pull/140/files]-
           -This MR introduced the env variables - specifically `DOCKER_CONFIG`-
           * --Update – further investigation – there has been an update to docker-commons-plugin that fixed this issue with- --https://issues.jenkins-ci.org/browse/JENKINS-52737---
           -Made a MR for to use the latest docker-commons:- -[-https://github.com/jenkinsci/docker-workflow-plugin/pull/193-]-
           * Update – Fixes need on the docker-commons logic. MR here: [https://github.com/jenkinsci/docker-commons-plugin/pull/82]
          jglick Jesse Glick made changes -
          Assignee Jesse Glick [ jglick ] Art V [ arty13 ]
          jglick Jesse Glick made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          jglick Jesse Glick made changes -
          Status In Progress [ 3 ] In Review [ 10005 ]
          arty13 Art V made changes -
          Remote Link This issue links to "Merge Request (Web Link)" [ 23838 ]
          arty13 Art V made changes -
          Remote Link This issue links to "[GitHub] Docker Commons Plugin PR #82 (Web Link)" [ 23839 ]
          arty13 Art V made changes -
          Remote Link This issue links to "Merge Request (Web Link)" [ 23838 ]
          arty13 Art V made changes -
          Assignee Art V [ arty13 ] Jesse Glick [ jglick ]

            People

            Assignee:
            jglick Jesse Glick
            Reporter:
            arty13 Art V
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: