Hi

I have started using a Dockerfile build argument to simplify my 
dependencies between images.


Namely, I have Dockerfile to build the image "secret_project/name" looking 
like:

ARG parent_version
FROM secret_project/parent_name:${parent_version}


My jenkins pipeline lets maven build the docker image.
Once maven finishes, I want to use dockerFingerprintFrom


In my Jenkinsfile, I have:

dockerFingerprintFrom dockerfile: filePath, image: 
docker.image("secret_project/name").id


and the pipeline fails with:


java.io.IOException: Cannot retrieve .Id from 'docker inspect 
secret_project/parent_name:${parent_version}'


Looking around, I see that this bug has been fixed already by "JENKINS-46105 
Docker 17.05 ARG in FROM breaks docker inspect 
<https://github.com/jenkinsci/docker-workflow-plugin/commit/35caf3faddf931dc49ee0182d4161380b2a541cb#diff-1d13cd3a55819d1da5ac7b25f232e43d>"
 
<https://github.com/jenkinsci/docker-workflow-plugin/commit/35caf3faddf931dc49ee0182d4161380b2a541cb#diff-1d13cd3a55819d1da5ac7b25f232e43d>


But I can't get it to work!


I have the exact same error with 
dockerFingerprintFrom dockerfile: filePath, image: 
docker.image("secret_project/name").id, buildArgs: ['parent_version': 
version]


How can I add the buildArgs to the dockerFingerprintFrom ?


Thanks
    dna




-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/84e84db1-8225-421d-898c-3d9e4123c749%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to