[JIRA] (JENKINS-44609) Docker inspect failing on named multi-stage builds

2019-08-02 Thread dnusb...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Devin Nusbaum resolved as Fixed  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 A fix for this issue was just released in Docker Pipeline plugin version 1.19. From the release notes:  
 
Deprecate the dockerFingerprintFrom and dockerFingerprintRun steps and stop calling them during docker.build and image.run. Fixes various issues with Dockerfile parsing and parsing arguments to docker build.
  
 

  
 
 
 
 

 
 Jenkins /  JENKINS-44609  
 
 
  Docker inspect failing on named multi-stage builds
 

  
 
 
 
 

 
Change By: 
 Devin Nusbaum  
 
 
Status: 
 Reopened Resolved  
 
 
Resolution: 
 Fixed  
 
 
Released As: 
 docker-workflow 1.19  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 
 

[JIRA] (JENKINS-44609) Docker inspect failing on named multi-stage builds

2019-04-18 Thread minip...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 david bensoussan commented on  JENKINS-44609  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Docker inspect failing on named multi-stage builds
 

  
 
 
 
 

 
 There is a PR solving this here: https://github.com/jenkinsci/docker-workflow-plugin/pull/162 Could a maintainer take a look at it?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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] (JENKINS-44609) Docker inspect failing on named multi-stage builds

2019-01-16 Thread taylor...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Taylor Patton edited a comment on  JENKINS-44609  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Docker inspect failing on named multi-stage builds
 

  
 
 
 
 

 
 Also seeing this same issue, but interestingly enough, it works in 1 job but not another, doing almost the exact same thing.Working code in question:{code:java} withCredentials([string(credentialsId: 'secret-key', variable: 'secret')]) { docker.build('mydockerimage', "--file ${DOCKERFILE} --pull --build-arg  KEY=${secret} --build-arg  BUILD_NUMBER=${BUILD_NUMBER} .") }  {code}Code that doesn't work:{code:java} withCredentials([string(credentialsId: 'secret-key', variable: 'secret')]) { docker.build('mydockerimage', "--file ${myProperties.DOCKERFILE} --pull --build-arg  KEY=${secret} --build-arg  BUILD_NUMBER=${params.BUILD_TO_DEPLOY} .") }  {code}Where "myProperties" is read from a properties file using "readProperties" from stage utils plugin. The docker image seems to be built fine in both cases, but in the latter, we see the error:{code:java}Successfully built 204ce2321dabSuccessfully tagged [Pipeline] dockerFingerprintFrom[Pipeline] }[Pipeline] // withCredentials[Pipeline] }[Pipeline] // withDockerRegistry[Pipeline] }[Pipeline] // withEnv[Pipeline] }[Pipeline] // stage[Pipeline] }[Pipeline] // node[Pipeline] End of Pipelinejava.io.IOException: Cannot retrieve .Id from 'docker inspect'{code}We do use the multi-stage docker build with "AS name" for the docker stages in the starting Dockerfile being built.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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] (JENKINS-44609) Docker inspect failing on named multi-stage builds

2019-01-16 Thread taylor...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Taylor Patton edited a comment on  JENKINS-44609  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Docker inspect failing on named multi-stage builds
 

  
 
 
 
 

 
 Also seeing this same issue, but interestingly enough, it works in 1 job but not another, doing almost the exact same thing.Working code in question:{code:java}withCredentials([string(credentialsId: 'secret-key', variable: 'secret')]) {docker.build('mydockerimage', "--file ${DOCKERFILE} --pull --build-arg KEY=${secret} --build-arg BUILD_NUMBER=${BUILD_NUMBER} .")} {code}Code that doesn't work:{code:java}withCredentials([string(credentialsId: 'secret-key', variable: 'secret')]) {docker.build('mydockerimage', "--file ${myProperties.DOCKERFILE} --pull --build-arg KEY=${secret} --build-arg BUILD_NUMBER=${ BUILD_NUMBER params.BUILD_TO_DEPLOY } .")} {code}Where "myProperties" is read from a properties file using "readProperties" from stage utils plugin. The docker image seems to be built fine in both cases, but in the latter, we see the error:{code:java}Successfully built 204ce2321dabSuccessfully tagged [Pipeline] dockerFingerprintFrom[Pipeline] }[Pipeline] // withCredentials[Pipeline] }[Pipeline] // withDockerRegistry[Pipeline] }[Pipeline] // withEnv[Pipeline] }[Pipeline] // stage[Pipeline] }[Pipeline] // node[Pipeline] End of Pipelinejava.io.IOException: Cannot retrieve .Id from 'docker inspect'{code}We do use the multi-stage docker build with "AS name" for the docker stages in the starting Dockerfile being built.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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] (JENKINS-44609) Docker inspect failing on named multi-stage builds

2019-01-16 Thread taylor...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Taylor Patton commented on  JENKINS-44609  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Docker inspect failing on named multi-stage builds
 

  
 
 
 
 

 
 Also seeing this same issue, but interestingly enough, it works in 1 job but not another, doing almost the exact same thing. Working code in question: 

 

withCredentials([string(credentialsId: 'secret-key', variable: 'secret')]) {
docker.build('mydockerimage', "--file ${DOCKERFILE} --pull --build-arg KEY=${secret} --build-arg BUILD_NUMBER=${BUILD_NUMBER} .")
}  

 Code that doesn't work: 

 

withCredentials([string(credentialsId: 'secret-key', variable: 'secret')]) {
docker.build('mydockerimage', "--file ${myProperties.DOCKERFILE} --pull --build-arg KEY=${secret} --build-arg BUILD_NUMBER=${BUILD_NUMBER} .")
}  

 Where "myProperties" is read from a properties file using "readProperties" from stage utils plugin. The docker image seems to be built fine in both cases, but in the latter, we see the error: 

 

Successfully built 204ce2321dab
Successfully tagged 
[Pipeline] dockerFingerprintFrom
[Pipeline] }
[Pipeline] // withCredentials
[Pipeline] }
[Pipeline] // withDockerRegistry
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
java.io.IOException: Cannot retrieve .Id from 'docker inspect' 

 We do use the multi-stage docker build with "AS name" for the docker stages in the starting Dockerfile being built.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
  

[JIRA] (JENKINS-44609) Docker inspect failing on named multi-stage builds

2019-01-14 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Glick commented on  JENKINS-44609  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Docker inspect failing on named multi-stage builds
 

  
 
 
 
 

 
 

makes things like deploying to registry more of a hassle
 For what it’s worth, my recommendation is 

 

withDockerRegistry(url: 'https://docker.corp/', credentialsId: 'docker-creds') {
  sh 'sh build-and-push'
}
 

 with the script being something like 

 

docker build -t docker.corp/x/y:$TAG .
docker push docker.corp/x/y:$TAG
 

  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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] (JENKINS-44609) Docker inspect failing on named multi-stage builds

2019-01-11 Thread ste...@weathers.me (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Weathers commented on  JENKINS-44609  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Docker inspect failing on named multi-stage builds
 

  
 
 
 
 

 
 Jesse Glick that's one thing I tried but makes things like deploying to registry more of a hassle.  Overall I've since abandoned trying to use Jenkins and have gone with another CI that worked flawlessly from the start since it was docker oriented.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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] (JENKINS-44609) Docker inspect failing on named multi-stage builds

2019-01-11 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Glick commented on  JENKINS-44609  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Docker inspect failing on named multi-stage builds
 

  
 
 
 
 

 
 Steven Weathers simply run sh 'docker build…' and do not use this feature.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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] (JENKINS-44609) Docker inspect failing on named multi-stage builds

2018-12-16 Thread ste...@weathers.me (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Weathers commented on  JENKINS-44609  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Docker inspect failing on named multi-stage builds
 

  
 
 
 
 

 
 I just setup Jenkins and ran into this issue as well, would love to see it resolved so I can utilize Jenkins otherwise this is a blocker for me.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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] (JENKINS-44609) Docker inspect failing on named multi-stage builds

2018-11-15 Thread sh...@usagi.io (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matic Gacar commented on  JENKINS-44609  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Docker inspect failing on named multi-stage builds
 

  
 
 
 
 

 
 We are also having trouble because of this, since we have to rewrite all of our Dockerfiles to be compatible with jenkins. Any news on this is appreciated.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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] (JENKINS-44609) Docker inspect failing on named multi-stage builds

2018-11-12 Thread antoine+...@moneyvoice.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Antoine Monnet commented on  JENKINS-44609  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Docker inspect failing on named multi-stage builds
 

  
 
 
 
 

 
 I've modified FromFingerprintStep, removed the Dockerfile parser and use docker inspect to walk up the image history up to the previous properly tagged image. This solves the multistage issue for me. https://github.com/jenkinsci/docker-workflow-plugin/pull/155  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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] (JENKINS-44609) Docker inspect failing on named multi-stage builds

2018-08-27 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Glick edited a comment on  JENKINS-44609  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Docker inspect failing on named multi-stage builds
 

  
 
 
 
 

 
 bq. is this plugin even being maintained?Not that I know of. IMO you should not use the {{docker}} DSL, nor the {{withDockerContainer}} step (including Declarative Pipeline’s {{agent \{docker …\}}}  and {{agent \{dockerfile …\}}} ), and at most use the {{withDockerRegistry}} and {{withDockerServer}} steps.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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] (JENKINS-44609) Docker inspect failing on named multi-stage builds

2018-08-27 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Glick commented on  JENKINS-44609  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Docker inspect failing on named multi-stage builds
 

  
 
 
 
 

 
 

is this plugin even being maintained?
 Not that I know of. IMO you should not use the docker DSL, nor the withDockerContainer step (including Declarative Pipeline’s agent {docker …}), and at most use the withDockerRegistry and withDockerServer steps.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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] (JENKINS-44609) Docker inspect failing on named multi-stage builds

2018-08-27 Thread anlu...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andreas Lutro commented on  JENKINS-44609  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Docker inspect failing on named multi-stage builds
 

  
 
 
 
 

 
 If you want to submit a "better" PR then don't let me stop you, but I'd rather have a working plugin with workarounds than a non-working one until someone (whoever that is) submits a "proper" solution. That being said, is this plugin even being maintained? Am I wasting my time commenting here and making a PR?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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] (JENKINS-44609) Docker inspect failing on named multi-stage builds

2018-08-16 Thread sinis...@2die4.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Dubrouski edited a comment on  JENKINS-44609  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Docker inspect failing on named multi-stage builds
 

  
 
 
 
 

 
 [~andreaslutro] et al.I feel it is rather work around. We faced this issue couple of weeks ago and I tried to poke around. So far the only solution I see is to change:[https://github.com/jenkinsci/pipeline-model-definition-plugin/blob/6cd7cb80203bd34cc0909e0e0a673c0d5d6a178b/pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfileScript.groovy]workflow and add additional parameter to DSL like `iidfile="path/to/file"`, so on the other side Docker Workflow plugin can check whether it is set or not and use ID from file instead of relying on naive parser.I could create PRs for both plugins, but would prefer to discuss this solutions first.Theoretically `–iidfile` can be added as a part of `buildArgs`, but then Workflow plugin will have to parse build args, in case of separate DSL parameter it is just a simple isEmpty check and a logic like this to get ID: {code:java}FilePath dockeridfile = workspace.child(step.iidfile);String id;try(InputStream isid = dockeridfile.read()) {try(BufferedReader r = new BufferedReader(new InputStreamReader(isid, "ISO-8859-1"))) {id = r.readLine();}}{code} Just to be clear I mean pipeline scenario like this:{code:java}stage('Build') {agent {dockerfile {filename 'Dockerfile'dir 'deployment'additionalBuildArgs '--target base'}}steps {sh "echo TEST123"}}{code}where Dockerfile is multi-stage and contains aliases like `FROM base AS prod`  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)  
 

  
 

   





-- 
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 

[JIRA] (JENKINS-44609) Docker inspect failing on named multi-stage builds

2018-08-16 Thread sinis...@2die4.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Dubrouski edited a comment on  JENKINS-44609  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Docker inspect failing on named multi-stage builds
 

  
 
 
 
 

 
 [~andreaslutro] et al.I feel it is rather work around. We faced this issue couple of weeks ago and I tried to poke around. So far the only solution I see is to change:[https://github.com/jenkinsci/pipeline-model-definition-plugin/blob/6cd7cb80203bd34cc0909e0e0a673c0d5d6a178b/pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfileScript.groovy]workflow and add additional parameter to DSL like `iidfile="path/to/file"`, so on the other side Docker Workflow plugin can check whether it is set or not and use ID from file instead of relying on naive parser.I could create PRs for both plugins, but would prefer to discuss this solutions first.Theoretically `–iidfile` can be added as a part of `buildArgs`, but then Workflow plugin will have to parse build args, in case of separate DSL parameter it is just a simple isEmpty check and a logic like this to get ID: {code:java}FilePath dockeridfile = workspace.child(step.iidfile);String id;try(InputStream isid = dockeridfile.read()) {try(BufferedReader r = new BufferedReader(new InputStreamReader(isid, "ISO-8859-1"))) {id = r.readLine();}}{code}Just to be clear I mean pipeline scenario like this:{code:java}stage('Build') {agent {dockerfile {filename 'Dockerfile'dir 'deployment'additionalBuildArgs '--target base'}}steps {sh "echo TEST123"}}{code}where Dockerfile is multi-stage and contains aliases like  `  "* FROM base AS prod ` *"  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)  
 

  
 

   





-- 
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 

[JIRA] (JENKINS-44609) Docker inspect failing on named multi-stage builds

2018-08-15 Thread sinis...@2die4.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Dubrouski commented on  JENKINS-44609  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Docker inspect failing on named multi-stage builds
 

  
 
 
 
 

 
 Andreas Lutro et al. I feel it is rather work around. We faced this issue couple of weeks ago and I tried to poke around. So far the only solution I see is to change: https://github.com/jenkinsci/pipeline-model-definition-plugin/blob/6cd7cb80203bd34cc0909e0e0a673c0d5d6a178b/pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfileScript.groovy workflow and add additional parameter to DSL like `iidfile="path/to/file"`, so on the other side Docker Workflow plugin can check whether it is set or not and use ID from file instead of relying on naive parser. I could create PRs for both plugins, but would prefer to discuss this solutions first. Theoretically `–iidfile` can be added as a part of `buildArgs`, but then Workflow plugin will have to parse build args, in case of separate DSL parameter it is just a simple isEmpty check and a logic like this to get ID:  

 

FilePath dockeridfile = workspace.child(step.iidfile);
String id;
try(InputStream isid = dockeridfile.read()) {
try(BufferedReader r = new BufferedReader(new InputStreamReader(isid, "ISO-8859-1"))) {
id = r.readLine();
}
}
 

  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)  
 

  
 

   





-- 
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] (JENKINS-44609) Docker inspect failing on named multi-stage builds

2018-08-14 Thread anlu...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andreas Lutro commented on  JENKINS-44609  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Docker inspect failing on named multi-stage builds
 

  
 
 
 
 

 
 I'm not an experienced java developer but this has been annoying me for way too long. I've opened a PR here with more fixes for this issue, but could use some guidance. https://github.com/jenkinsci/docker-workflow-plugin/pull/149  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)  
 

  
 

   





-- 
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.