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

docker login being called without server-related environment variables

      Split out from JENKINS-38018. The environment variables set by withDockerServer are not being passed to the docker login command.

          [JENKINS-51397] docker login being called without server-related environment variables

          Jesse Glick created issue -
          Jesse Glick made changes -
          Link New: This issue blocks JENKINS-38018 [ JENKINS-38018 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "Page (Jenkins Wiki)" [ 20688 ]

          This works with

          docker-plugin 1.1.4
          docker-workflow 1.15.1

           

          but not with

          docker-plugin 1.1.4
          docker-workflow 1.6

           

              // run from base dir for folder builds and from tmp for url builds
              dir ("$runPwd") {
                  echo "Build with server ${env.DOCKER_HOST} and registry ${env.CP_DOCKER_RELEASE}"
                  docker.withServer(env.DOCKER_HOST) {
                      docker.withRegistry(env.CP_DOCKER_RELEASE,env.DOCKER_CREDENTIALS ){
                          echo "Execute docker build -t $name:$version $params"
                          sh "docker   build -t $name:$version $params"
          //                def image = docker.build ("$name:$version", params)
                      }
                  }
              }
          

          Nico Navarrete added a comment - This works with docker-plugin 1.1.4 docker-workflow 1.15.1   but not with docker-plugin 1.1.4 docker-workflow 1.6       // run from base dir for folder builds and from tmp for url builds     dir ( "$runPwd" ) {         echo "Build with server ${env.DOCKER_HOST} and registry ${env.CP_DOCKER_RELEASE}"         docker.withServer(env.DOCKER_HOST) {             docker.withRegistry(env.CP_DOCKER_RELEASE,env.DOCKER_CREDENTIALS ){                 echo "Execute docker build -t $name:$version $params"                 sh "docker   build -t $name:$version $params" //                def image = docker.build ( "$name:$version" , params)             }         }     }
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "docker-commons PR 71 (Web Link)" [ 20689 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "docker-workflow PR 140 (Web Link)" [ 20690 ]
          Jesse Glick made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]

          Jesse Glick added a comment -

          nicolasus vwbusguy schulzha et al., anyone care to test a proposed fix? If so, use the Advanced tab to manually update this build of docker-commons and of docker-workflow.

          Jesse Glick added a comment - nicolasus vwbusguy schulzha et al., anyone care to test a proposed fix? If so, use the Advanced tab to manually update this build of docker-commons and of docker-workflow .

          Jesse Glick added a comment -

          BTW nicolasus the version of the docker plugin is probably irrelevant here. docker-commons and docker-workflow are the plugins involved.

          Jesse Glick added a comment - BTW nicolasus the version of the docker plugin is probably irrelevant here. docker-commons and docker-workflow are the plugins involved.

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: