Variables expansion in "Docker xxx" build step
See original GitHub issueI’m trying to set up Jenkins job to build/push images for different projects. So I created the Job which is downstream for several projects. Upstream jobs pass path to Dockerfile, repository name and image tag via Parameterized Build/Trigger Plugins. But Docker Plugin fails to expand those vars and to find Dockerfile respectively:
[...]
Docker Build
Docker Build: building image at path /${WORKSPACE}/${DOCKERFILE_DIRECTORY}
ERROR: Build step failed with exception
java.lang.IllegalArgumentException: Dockerfile does not exist
[...]
Is there a way to use Env vars with this Plugin? Or can you add this possibility, pls?
ps: Jenkins is v2.19.3, Docker Plugin is v0.16.2
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:9
Top Results From Across the Web
Variables expansion in "Docker xxx" build step - - Bountysource
I'm trying to set up Jenkins job to build/push images for different projects. So I created the Job which is downstream for several...
Read more >How to use Docker Build Args and Environment Variables
Today, we will discuss docker ARG and ENV variables in detail. We will go through various examples of dockerfile and docker compose for...
Read more >dockerfile - Docker variable expansion - Stack Overflow
The ENV instruction sets the environment variable to the value . This value will be in the environment of all descendant Dockerfile commands...
Read more >Compose file version 2 reference - Docker Documentation
Add build arguments, which are environment variables accessible only during the build process. First, specify the arguments in your Dockerfile:.
Read more >Use docker images built in previous stages - GitLab.org
build : stage: build image: xxx script: # generate DOCKER_IMAGE_TAG_REF & the SHA is in /digest-file as a result of the image build...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Seems like it is solved in Docker plugin version 1.1! Now it is possible to push imagename:${BUILD_NUMBER} \o/.
+1 Would be super useful