[JIRA] [docker-workflow-plugin] (JENKINS-34276) docker.inside within a withRegistry block seems to use image.id instead of image.imageName()

2016-05-25 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen edited a comment on  JENKINS-34276 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker.inside within a withRegistry block seems to use image.id instead of image.imageName()  
 
 
 
 
 
 
 
 
 
 h3. Steps to Reproduce for [~jglick]:# h5. Build image {{example/jenkins-34276:latest}} private repository {{repo.example.com:5000}}# h5. Verify you can pull this image from your Jenkins slave, e.g.:{code}docker pull repo.example.com:5000/example/jenkins-34276:latest{code}# h5. Attempt to access image with the below pipeline snippet (assumes credentials {{anonymous}} exist are allowed to pull from the private repo):{code}node ('build && docker') {docker.withRegistry('https://repo.example.com:5000', 'anonymous') {def exampleImg = docker.image('example/jenkins-34276)exampleImg.pull() // make sure the image is up-to-dateexampleImg.inside {sh 'env | sort'}}}{code}# h5. Witness failure as below:{code}Started by user Jacob Blain Christen[Pipeline] nodeRunning on build-507941e0b4db in /var/lib/jenkins/workspace/JCHRISTEN/docker-inside[Pipeline] {[Pipeline] withEnv[Pipeline] {[Pipeline] withDockerRegistry[Pipeline] {[Pipeline] sh[docker-inside] Running shell script+ docker pull repo.example.com:5000/example/jenkins-34276Using default tag: latestlatest: Pulling from example/jenkins-342766599cadaf950: Already exists23eda618d451: Already existsf0be3084efe9: Already exists52de432f084b: Already existsa3ed95caeb02: Already exists79ea8cd5fef8: Already existsb5b96651da0d: Pulling fs layer945ed45a59ec: Pulling fs layerf720300846de: Pulling fs layer80e10de1adee: Pulling fs layer80e10de1adee: Waitingf720300846de: Verifying Checksumf720300846de: Download complete80e10de1adee: Verifying Checksum80e10de1adee: Download completeb5b96651da0d: Verifying Checksumb5b96651da0d: Download complete945ed45a59ec: Verifying Checksum945ed45a59ec: Download completeb5b96651da0d: Pull completeb5b96651da0d: Pull complete945ed45a59ec: Pull complete945ed45a59ec: Pull completef720300846de: Pull completef720300846de: Pull complete80e10de1adee: Pull complete80e10de1adee: Pull completeDigest: sha256:c526a65b8bd1a7e68a7376a1b53e0880d6955f9a7aa29d8df56b5a8fac9b8537Status: Downloaded newer image for repo.example.com:5000/example/jenkins-34276:latest[Pipeline] sh[docker-inside] Running shell script+ docker inspect -f . example/jenkins-34276Error: No such image or container: example/jenkins-34276[Pipeline] sh[docker-inside] Running shell script+ docker pull repo.example.com:5000/example/jenkins-34276Using default tag: latestlatest: Pulling from example/jenkins-34276Digest: sha256:c526a65b8bd1a7e68a7376a1b53e0880d6955f9a7aa29d8df56b5a8fac9b8537Status: Image is up to date for repo.example.com:5000/example/jenkins-34276:latest[Pipeline] withDockerContainer$ docker run -t -d -u 1000:1000 -w /var/lib/jenkins/workspace/JCHRISTEN/docker-inside -v /var/lib/jenkins/workspace/JCHRISTEN/docker-inside:/var/lib/jenkins/workspace/JCHRISTEN/docker-inside:rw -v /var/lib/jenkins/workspace/JCHRISTEN/docker-inside@tmp:/var/lib/jenkins/workspace/JCHRISTEN/docker-inside@tmp:rw -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  example/jenkins-34276 cat[Pipeline] // withDockerContainer[Pipeline] }[Pipeline] // withDockerRegistry[Pipeline] }[Pipeline] // withEnv[Pipeline] }[Pipeline] // node[Pipeline] End of Pipelinejava.io.IOException: Failed to run image 'example/jenkins-34276'. Error: Unable to find image 'example/jenkins-34276:latest' locallyPulling repository docker.io/example/jenkins-34276docker: Error: image example/jenkins-34276 not found.See 'docker run --help'. at org.jenkinsci.plugins.docker.workflow.client.DockerClient.run(DockerClient.java:112) at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:145) at 

[JIRA] [docker-workflow-plugin] (JENKINS-34276) docker.inside within a withRegistry block seems to use image.id instead of image.imageName()

2016-05-25 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen commented on  JENKINS-34276 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker.inside within a withRegistry block seems to use image.id instead of image.imageName()  
 
 
 
 
 
 
 
 
 
 
Steps to Reproduce for Jesse Glick: 
 

Build image example/jenkins-34276:latest private repository repo.example.com:5000
 

Verify you can pull this image from your Jenkins slave, e.g.: 

 

docker pull repo.example.com:5000/example/jenkins-34276:latest
 


 

Attempt to access image with the below pipeline snippet (assumes credentials anonymous exist are allowed to pull from the private repo): 

 

node ('build && docker') {
docker.withRegistry('https://repo.example.com:5000', 'anonymous') {
def exampleImg = docker.image('example/jenkins-34276)
exampleImg.pull() // make sure the image is up-to-date
exampleImg.inside {
sh 'env | sort'
}
}
}
 


 

h5 Witness failure as below: 

 

Started by user Jacob Blain Christen
[Pipeline] node
Running on build-507941e0b4db in /var/lib/jenkins/workspace/JCHRISTEN/docker-inside
[Pipeline] {
[Pipeline] withEnv
[Pipeline] {
[Pipeline] withDockerRegistry
[Pipeline] {
[Pipeline] sh
[docker-inside] Running shell script
+ docker pull repo.example.com:5000/example/jenkins-34276
Using default tag: latest
latest: Pulling from example/jenkins-34276
6599cadaf950: Already exists
23eda618d451: Already exists
f0be3084efe9: Already exists
52de432f084b: Already exists
a3ed95caeb02: Already exists
79ea8cd5fef8: Already exists
b5b96651da0d: Pulling fs layer
945ed45a59ec: Pulling fs layer
f720300846de: Pulling fs layer
80e10de1adee: Pulling fs layer
80e10de1adee: Waiting
f720300846de: Verifying Checksum
f720300846de: Download complete
80e10de1adee: Verifying Checksum
80e10de1adee: Download complete
b5b96651da0d: Verifying Checksum
b5b96651da0d: Download complete
945ed45a59ec: Verifying Checksum
945ed45a59ec: Download complete
b5b96651da0d: Pull complete
b5b96651da0d: Pull complete
945ed45a59ec: Pull complete
945ed45a59ec: Pull complete
f720300846de: Pull complete
f720300846de: Pull complete
80e10de1adee: Pull complete
80e10de1adee: Pull complete
Digest: sha256:c526a65b8bd1a7e68a7376a1b53e0880d6955f9a7aa29d8df56b5a8fac9b8537
Status: Downloaded newer image for repo.example.com:5000/example/jenkins-34276:latest
[Pipeline] sh
[docker-inside] Running shell script
+ docker inspect -f . example/jenkins-34276

Error: No such image or container: example/jenkins-34276
[Pipeline] sh
[docker-inside] Running shell script
+ docker pull repo.example.com:5000/example/jenkins-34276
Using default tag: latest
latest: 

[JIRA] [docker-workflow-plugin] (JENKINS-34276) docker.inside within a withRegistry block seems to use image.id instead of image.imageName()

2016-05-25 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen edited a comment on  JENKINS-34276 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker.inside within a withRegistry block seems to use image.id instead of image.imageName()  
 
 
 
 
 
 
 
 
 
 h2 h3 . Steps to Reproduce for [~jglick]:# h5. Build image {{example/jenkins-34276:latest}} private repository {{repo.example.com:5000}}# h5. Verify you can pull this image from your Jenkins slave, e.g.:{code}docker pull repo.example.com:5000/example/jenkins-34276:latest{code}# h5. Attempt to access image with the below pipeline snippet (assumes credentials {{anonymous}} exist are allowed to pull from the private repo):{code}node ('build && docker') {docker.withRegistry('https://repo.example.com:5000', 'anonymous') {def exampleImg = docker.image('example/jenkins-34276)exampleImg.pull() // make sure the image is up-to-dateexampleImg.inside {sh 'env | sort'}}}{code}# h5. Witness failure as below:{code}Started by user Jacob Blain Christen[Pipeline] nodeRunning on build-507941e0b4db in /var/lib/jenkins/workspace/JCHRISTEN/docker-inside[Pipeline] {[Pipeline] withEnv[Pipeline] {[Pipeline] withDockerRegistry[Pipeline] {[Pipeline] sh[docker-inside] Running shell script+ docker pull repo.example.com:5000/example/jenkins-34276Using default tag: latestlatest: Pulling from example/jenkins-342766599cadaf950: Already exists23eda618d451: Already existsf0be3084efe9: Already exists52de432f084b: Already existsa3ed95caeb02: Already exists79ea8cd5fef8: Already existsb5b96651da0d: Pulling fs layer945ed45a59ec: Pulling fs layerf720300846de: Pulling fs layer80e10de1adee: Pulling fs layer80e10de1adee: Waitingf720300846de: Verifying Checksumf720300846de: Download complete80e10de1adee: Verifying Checksum80e10de1adee: Download completeb5b96651da0d: Verifying Checksumb5b96651da0d: Download complete945ed45a59ec: Verifying Checksum945ed45a59ec: Download completeb5b96651da0d: Pull completeb5b96651da0d: Pull complete945ed45a59ec: Pull complete945ed45a59ec: Pull completef720300846de: Pull completef720300846de: Pull complete80e10de1adee: Pull complete80e10de1adee: Pull completeDigest: sha256:c526a65b8bd1a7e68a7376a1b53e0880d6955f9a7aa29d8df56b5a8fac9b8537Status: Downloaded newer image for repo.example.com:5000/example/jenkins-34276:latest[Pipeline] sh[docker-inside] Running shell script+ docker inspect -f . example/jenkins-34276Error: No such image or container: example/jenkins-34276[Pipeline] sh[docker-inside] Running shell script+ docker pull repo.example.com:5000/example/jenkins-34276Using default tag: latestlatest: Pulling from example/jenkins-34276Digest: sha256:c526a65b8bd1a7e68a7376a1b53e0880d6955f9a7aa29d8df56b5a8fac9b8537Status: Image is up to date for repo.example.com:5000/example/jenkins-34276:latest[Pipeline] withDockerContainer$ docker run -t -d -u 1000:1000 -w /var/lib/jenkins/workspace/JCHRISTEN/docker-inside -v /var/lib/jenkins/workspace/JCHRISTEN/docker-inside:/var/lib/jenkins/workspace/JCHRISTEN/docker-inside:rw -v /var/lib/jenkins/workspace/JCHRISTEN/docker-inside@tmp:/var/lib/jenkins/workspace/JCHRISTEN/docker-inside@tmp:rw -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  example/jenkins-34276 cat[Pipeline] // withDockerContainer[Pipeline] }[Pipeline] // withDockerRegistry[Pipeline] }[Pipeline] // withEnv[Pipeline] }[Pipeline] // node[Pipeline] End of Pipelinejava.io.IOException: Failed to run image 'example/jenkins-34276'. Error: Unable to find image 'example/jenkins-34276:latest' locallyPulling repository docker.io/example/jenkins-34276docker: Error: image example/jenkins-34276 not found.See 'docker run --help'. at org.jenkinsci.plugins.docker.workflow.client.DockerClient.run(DockerClient.java:112) at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:145) at 

[JIRA] [docker-workflow-plugin] (JENKINS-34276) docker.inside within a withRegistry block seems to use image.id instead of image.imageName()

2016-05-25 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen edited a comment on  JENKINS-34276 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker.inside within a withRegistry block seems to use image.id instead of image.imageName()  
 
 
 
 
 
 
 
 
 
 h2. Steps to Reproduce for [~jglick]:# h4. Build image {{example/jenkins-34276:latest}} private repository {{repo.example.com:5000}}# h4. Verify you can pull this image from your Jenkins slave, e.g.:{code}docker pull repo.example.com:5000/example/jenkins-34276:latest{code}# h4. Attempt to access image with the below pipeline snippet (assumes credentials {{anonymous}} exist are allowed to pull from the private repo):{code}node ('build && docker') {docker.withRegistry('https://repo.example.com:5000', 'anonymous') {def exampleImg = docker.image('example/jenkins-34276)exampleImg.pull() // make sure the image is up-to-dateexampleImg.inside {sh 'env | sort'}}}{code}# h5 .  Witness failure as below:{code}Started by user Jacob Blain Christen[Pipeline] nodeRunning on build-507941e0b4db in /var/lib/jenkins/workspace/JCHRISTEN/docker-inside[Pipeline] {[Pipeline] withEnv[Pipeline] {[Pipeline] withDockerRegistry[Pipeline] {[Pipeline] sh[docker-inside] Running shell script+ docker pull repo.example.com:5000/example/jenkins-34276Using default tag: latestlatest: Pulling from example/jenkins-342766599cadaf950: Already exists23eda618d451: Already existsf0be3084efe9: Already exists52de432f084b: Already existsa3ed95caeb02: Already exists79ea8cd5fef8: Already existsb5b96651da0d: Pulling fs layer945ed45a59ec: Pulling fs layerf720300846de: Pulling fs layer80e10de1adee: Pulling fs layer80e10de1adee: Waitingf720300846de: Verifying Checksumf720300846de: Download complete80e10de1adee: Verifying Checksum80e10de1adee: Download completeb5b96651da0d: Verifying Checksumb5b96651da0d: Download complete945ed45a59ec: Verifying Checksum945ed45a59ec: Download completeb5b96651da0d: Pull completeb5b96651da0d: Pull complete945ed45a59ec: Pull complete945ed45a59ec: Pull completef720300846de: Pull completef720300846de: Pull complete80e10de1adee: Pull complete80e10de1adee: Pull completeDigest: sha256:c526a65b8bd1a7e68a7376a1b53e0880d6955f9a7aa29d8df56b5a8fac9b8537Status: Downloaded newer image for repo.example.com:5000/example/jenkins-34276:latest[Pipeline] sh[docker-inside] Running shell script+ docker inspect -f . example/jenkins-34276Error: No such image or container: example/jenkins-34276[Pipeline] sh[docker-inside] Running shell script+ docker pull repo.example.com:5000/example/jenkins-34276Using default tag: latestlatest: Pulling from example/jenkins-34276Digest: sha256:c526a65b8bd1a7e68a7376a1b53e0880d6955f9a7aa29d8df56b5a8fac9b8537Status: Image is up to date for repo.example.com:5000/example/jenkins-34276:latest[Pipeline] withDockerContainer$ docker run -t -d -u 1000:1000 -w /var/lib/jenkins/workspace/JCHRISTEN/docker-inside -v /var/lib/jenkins/workspace/JCHRISTEN/docker-inside:/var/lib/jenkins/workspace/JCHRISTEN/docker-inside:rw -v /var/lib/jenkins/workspace/JCHRISTEN/docker-inside@tmp:/var/lib/jenkins/workspace/JCHRISTEN/docker-inside@tmp:rw -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  example/jenkins-34276 cat[Pipeline] // withDockerContainer[Pipeline] }[Pipeline] // withDockerRegistry[Pipeline] }[Pipeline] // withEnv[Pipeline] }[Pipeline] // node[Pipeline] End of Pipelinejava.io.IOException: Failed to run image 'example/jenkins-34276'. Error: Unable to find image 'example/jenkins-34276:latest' locallyPulling repository docker.io/example/jenkins-34276docker: Error: image example/jenkins-34276 not found.See 'docker run --help'. at org.jenkinsci.plugins.docker.workflow.client.DockerClient.run(DockerClient.java:112) at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:145) at 

[JIRA] [docker-workflow-plugin] (JENKINS-34276) docker.inside within a withRegistry block seems to use image.id instead of image.imageName()

2016-05-25 Thread dweom...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jacob Blain Christen edited a comment on  JENKINS-34276 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker.inside within a withRegistry block seems to use image.id instead of image.imageName()  
 
 
 
 
 
 
 
 
 
 h2. Steps to Reproduce for [~jglick]:#  h4  h5 . Build image {{example/jenkins-34276:latest}} private repository {{repo.example.com:5000}}#  h4  h5 . Verify you can pull this image from your Jenkins slave, e.g.:{code}docker pull repo.example.com:5000/example/jenkins-34276:latest{code}#  h4  h5 . Attempt to access image with the below pipeline snippet (assumes credentials {{anonymous}} exist are allowed to pull from the private repo):{code}node ('build && docker') {docker.withRegistry('https://repo.example.com:5000', 'anonymous') {def exampleImg = docker.image('example/jenkins-34276)exampleImg.pull() // make sure the image is up-to-dateexampleImg.inside {sh 'env | sort'}}}{code}# h5. Witness failure as below:{code}Started by user Jacob Blain Christen[Pipeline] nodeRunning on build-507941e0b4db in /var/lib/jenkins/workspace/JCHRISTEN/docker-inside[Pipeline] {[Pipeline] withEnv[Pipeline] {[Pipeline] withDockerRegistry[Pipeline] {[Pipeline] sh[docker-inside] Running shell script+ docker pull repo.example.com:5000/example/jenkins-34276Using default tag: latestlatest: Pulling from example/jenkins-342766599cadaf950: Already exists23eda618d451: Already existsf0be3084efe9: Already exists52de432f084b: Already existsa3ed95caeb02: Already exists79ea8cd5fef8: Already existsb5b96651da0d: Pulling fs layer945ed45a59ec: Pulling fs layerf720300846de: Pulling fs layer80e10de1adee: Pulling fs layer80e10de1adee: Waitingf720300846de: Verifying Checksumf720300846de: Download complete80e10de1adee: Verifying Checksum80e10de1adee: Download completeb5b96651da0d: Verifying Checksumb5b96651da0d: Download complete945ed45a59ec: Verifying Checksum945ed45a59ec: Download completeb5b96651da0d: Pull completeb5b96651da0d: Pull complete945ed45a59ec: Pull complete945ed45a59ec: Pull completef720300846de: Pull completef720300846de: Pull complete80e10de1adee: Pull complete80e10de1adee: Pull completeDigest: sha256:c526a65b8bd1a7e68a7376a1b53e0880d6955f9a7aa29d8df56b5a8fac9b8537Status: Downloaded newer image for repo.example.com:5000/example/jenkins-34276:latest[Pipeline] sh[docker-inside] Running shell script+ docker inspect -f . example/jenkins-34276Error: No such image or container: example/jenkins-34276[Pipeline] sh[docker-inside] Running shell script+ docker pull repo.example.com:5000/example/jenkins-34276Using default tag: latestlatest: Pulling from example/jenkins-34276Digest: sha256:c526a65b8bd1a7e68a7376a1b53e0880d6955f9a7aa29d8df56b5a8fac9b8537Status: Image is up to date for repo.example.com:5000/example/jenkins-34276:latest[Pipeline] withDockerContainer$ docker run -t -d -u 1000:1000 -w /var/lib/jenkins/workspace/JCHRISTEN/docker-inside -v /var/lib/jenkins/workspace/JCHRISTEN/docker-inside:/var/lib/jenkins/workspace/JCHRISTEN/docker-inside:rw -v /var/lib/jenkins/workspace/JCHRISTEN/docker-inside@tmp:/var/lib/jenkins/workspace/JCHRISTEN/docker-inside@tmp:rw -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  example/jenkins-34276 cat[Pipeline] // withDockerContainer[Pipeline] }[Pipeline] // withDockerRegistry[Pipeline] }[Pipeline] // withEnv[Pipeline] }[Pipeline] // node[Pipeline] End of Pipelinejava.io.IOException: Failed to run image 'example/jenkins-34276'. Error: Unable to find image 'example/jenkins-34276:latest' locallyPulling repository docker.io/example/jenkins-34276docker: Error: image example/jenkins-34276 not found.See 'docker run --help'. at org.jenkinsci.plugins.docker.workflow.client.DockerClient.run(DockerClient.java:112) at 

[JIRA] [docker-workflow-plugin] (JENKINS-34276) docker.inside within a withRegistry block seems to use image.id instead of image.imageName()

2016-05-10 Thread arthur.vanduynho...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Art V commented on  JENKINS-34276 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker.inside within a withRegistry block seems to use image.id instead of image.imageName()  
 
 
 
 
 
 
 
 
 
 
Same type of issue when using withRegistry and image.run() command. It uses the ID and not the imageName() so fails to find the image from the private registry. Should be same type of fix as this. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [docker-workflow-plugin] (JENKINS-34276) docker.inside within a withRegistry block seems to use image.id instead of image.imageName()

2016-04-19 Thread radesh....@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Radesh Rao commented on  JENKINS-34276 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker.inside within a withRegistry block seems to use image.id instead of image.imageName()  
 
 
 
 
 
 
 
 
 
 
The test job that I had succeeds with the patch: 

 

Started by user Radesh Rao
[Pipeline] Allocate node : Start
Running on docker in /data/jenkins/workspace/My pipeline
[Pipeline] node {
[Pipeline] Set environment variables : Start
[Pipeline] withEnv {
[Pipeline] Sets up Docker registry endpoint : Start
[Pipeline] withDockerRegistry {
[Pipeline] sh
[Cloud pipeline] Running shell script
+ echo my.registry.com/build-env:jdk8-maven3 -- build-env:jdk8-maven3
my.registry.com/build-env:jdk8-maven3 -- build-env:jdk8-maven3
[Pipeline] sh
[Cloud pipeline] Running shell script
+ docker inspect -f . build-env:jdk8-maven3

Error: No such image or container: build-env:jdk8-maven3
[Pipeline] sh
[Cloud pipeline] Running shell script
+ docker pull my.registry.com/build-env:jdk8-maven3
jdk8-maven3: Pulling from build-env
// 
// snip
// 
Status: Image is up to date for my.registry.com/build-env:jdk8-maven3
[Pipeline] Run build steps inside a Docker container : Start
$ docker run -t -d -u 995:991 -w "/data/jenkins/workspace/My pipeline" -v "/data/jenkins/workspace/My pipeline:/data/jenkins/workspace/My pipeline:rw" -v "/data/jenkins/workspace/My pipeline@tmp:/data/jenkins/workspace/My pipeline@tmp:rw" -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  -e  my.registry.com/build-env:jdk8-maven3 cat
[Pipeline] withDockerContainer {
[Pipeline] sh
[Cloud pipeline] Running shell script
+ echo Hello
Hello
[Pipeline] } //withDockerContainer
$ docker stop a9bf6ced0bceb9731144db9d639ae702587238d67ad5af55107dec5e5ad54333
$ docker rm -f a9bf6ced0bceb9731144db9d639ae702587238d67ad5af55107dec5e5ad54333
[Pipeline] Run build steps inside a Docker container : End
[Pipeline] } //withDockerRegistry
[Pipeline] Sets up Docker registry endpoint : End
[Pipeline] } //withEnv
[Pipeline] Set environment variables : End
[Pipeline] } //node
[Pipeline] Allocate node : End
[Pipeline] End of Pipeline
Finished: SUCCESS
 

 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA 

[JIRA] [docker-workflow-plugin] (JENKINS-34276) docker.inside within a withRegistry block seems to use image.id instead of image.imageName()

2016-04-19 Thread radesh....@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Radesh Rao commented on  JENKINS-34276 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker.inside within a withRegistry block seems to use image.id instead of image.imageName()  
 
 
 
 
 
 
 
 
 
 
Jesse Glick: I'll try and build this patch and test out the plugin. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [docker-workflow-plugin] (JENKINS-34276) docker.inside within a withRegistry block seems to use image.id instead of image.imageName()

2016-04-19 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jesse Glick commented on  JENKINS-34276 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker.inside within a withRegistry block seems to use image.id instead of image.imageName()  
 
 
 
 
 
 
 
 
 
 
Proposed patch: 

 

diff --git a/src/main/resources/org/jenkinsci/plugins/docker/workflow/Docker.groovy b/src/main/resources/org/jenkinsci/plugins/docker/workflow/Docker.groovy
index 5842ed5..6a84158 100644
--- a/src/main/resources/org/jenkinsci/plugins/docker/workflow/Docker.groovy
+++ b/src/main/resources/org/jenkinsci/plugins/docker/workflow/Docker.groovy
@@ -109,7 +109,7 @@ class Docker implements Serializable {
 // withDockerContainer requires the image to be available locally, since its start phase is not a durable task.
 pull()
 }
-docker.script.withDockerContainer(image: id, args: args, toolName: docker.script.env.DOCKER_TOOL_NAME) {
+docker.script.withDockerContainer(image: imageName(), args: args, toolName: docker.script.env.DOCKER_TOOL_NAME) {
 body()
 }
 }
 

 
but need to figure out how to reproduce the problem to verify the fix. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [docker-workflow-plugin] (JENKINS-34276) docker.inside within a withRegistry block seems to use image.id instead of image.imageName()

2016-04-19 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jesse Glick updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-34276 
 
 
 
  docker.inside within a withRegistry block seems to use image.id instead of image.imageName()  
 
 
 
 
 
 
 
 
 

Change By:
 
 Jesse Glick 
 
 
 

Component/s:
 
 workflow-plugin 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [docker-workflow-plugin] (JENKINS-34276) docker.inside within a withRegistry block seems to use image.id instead of image.imageName()

2016-04-15 Thread radesh....@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Radesh Rao created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-34276 
 
 
 
  docker.inside within a withRegistry block seems to use image.id instead of image.imageName()  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  Bug 
 
 
 

Assignee:
 
 Jesse Glick 
 
 
 

Components:
 

 docker-workflow-plugin, workflow-plugin 
 
 
 

Created:
 

 2016/Apr/15 1:16 PM 
 
 
 

Priority:
 
  Major 
 
 
 

Reporter:
 
 Radesh Rao 
 
 
 
 
 
 
 
 
 
 
I'm trying to execute a maven build inside of my custom container (my.registry.com/build-env:jdk8-maven3): 

 

node('docker') {
 docker.withRegistry('https://my.registry.com', 'docker-registry-login') {
def maven = docker.image("my-build-env:jdk8-maven3")

sh "echo ${maven.imageName()} -- ${maven.id}"
maven.pull()
maven.inside() {
sh "echo Hello"
}
 }
}
 

 
It goes well until the pull, which uses the imageName (my.registry.com/build-env:jdk8-maven3) but the run command uses id (build-env:jdk8-maven3) 
Abbreviated logs: 

 

Started by user Radesh Rao
[Pipeline] Allocate node : Start
Running on docker in /data/jenkins/workspace/My pipeline
[Pipeline] node {
[Pipeline] Set environment variables : Start
[Pipeline] withEnv {
[Pipeline] Sets up Docker registry endpoint : Start
[Pipeline] withDockerRegistry {
[Pipeline] sh
[Cloud pipeline] Running shell script
+ echo