[JIRA] [docker-custom-build-environment-plugin] (JENKINS-30882) Multi-configuration variables not used properly to construct build command

4 views
Skip to first unread message

john@johnleach.co.uk (JIRA)

unread,
Oct 11, 2015, 6:42:01 PM10/11/15
to jenkinsc...@googlegroups.com
John Leach created an issue
 
Jenkins / Bug JENKINS-30882
Multi-configuration variables not used properly to construct build command
Issue Type: Bug Bug
Assignee: Nicolas De Loof
Components: docker-custom-build-environment-plugin
Created: 11/Oct/15 10:41 PM
Priority: Minor Minor
Reporter: John Leach

I'm using Multi-configuration variables in the Dockerfile parameter box (Dockerfile.$ubuntu_release.$jdk in this example). They are used correctly in the error output but not in the actual docker build command, so the build fails:

{{Build Docker image from ./Dockerfile ...
$ docker build --tag 6e06fb3a96de83181451f73a093d1313f340d7f5 --file Dockerfile.$ubuntu_release.$jdk /home/core/jenkins/workspace/project/jdk/oraclejdk7/label/docker/ubuntu_release/lucid
The Dockerfile (Dockerfile.lucid.oraclejdk7) must be within the build context (/home/core/jenkins/workspace/project/jdk/oraclejdk7/label/docker/ubuntu_release/lucid)
FATAL: Failed to build docker image from project Dockerfile
java.lang.RuntimeException: Failed to build docker image from project Dockerfile
at com.cloudbees.jenkins.plugins.docker_build_env.Docker.buildImage(Docker.java:121)
at com.cloudbees.jenkins.plugins.docker_build_env.DockerfileImageSelector.prepareDockerImage(DockerfileImageSelector.java:41)
at com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.setUp(DockerBuildWrapper.java:152)
at hudson.model.Build$BuildExecution.doRun(Build.java:156)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
at hudson.model.Run.execute(Run.java:1741)
at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:408)
Notifying upstream projects of job completion
Finished: FAILURE}}

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

maierbacher@gmail.com (JIRA)

unread,
Dec 4, 2015, 3:17:01 AM12/4/15
to jenkinsc...@googlegroups.com
Thomas Maierbacher commented on Bug JENKINS-30882
 
Re: Multi-configuration variables not used properly to construct build command

Same form me here.
I like to build my repository in two different ubuntu environments, thus i have two Dockerfiles in my repo.

Additionally there is the problem that the docker tag (e.g. 6e06fb3a96de83181451f73a093d1313f340d7f5) only depends on the git commit, with might be identical for both Dockerfiles. It is not possible for the plugin two distinguish the docker containers.

Currently it is not possible to setup a multi-config environment with this plugin

maierbacher@gmail.com (JIRA)

unread,
Dec 4, 2015, 3:29:01 AM12/4/15
to jenkinsc...@googlegroups.com
Thomas Maierbacher edited a comment on Bug JENKINS-30882
Same form me here. 
I like to build my repository in two different ubuntu environments, thus i have two Dockerfiles in my repo.

Additionally there is the problem that the docker tag (e.g. 6e06fb3a96de83181451f73a093d1313f340d7f5)  -  only depends on the git commit, with might be  - is  identical for both Dockerfiles  (it seems that the file "Dockerfile" is hashed each time) . It is not possible for the plugin two distinguish the docker containers.


Currently it is not possible to setup a multi-config environment with this plugin

maierbacher@gmail.com (JIRA)

unread,
Dec 4, 2015, 3:33:02 AM12/4/15
to jenkinsc...@googlegroups.com
Thomas Maierbacher edited a comment on Bug JENKINS-30882
Same form me here. 
I like to build my repository in two different ubuntu environments, thus i have two Dockerfiles in my repo.

Additionally there is the problem that the docker tag (e.g. 6e06fb3a96de83181451f73a093d1313f340d7f5) -only depends on the git commit, with might be - is identical for both Dockerfiles (it seems that the file "Dockerfile" is hashed each time). It is not possible for the plugin two distinguish the docker containers.


Currently it is not possible to setup a multi-config environment with this plugin

john@johnleach.co.uk (JIRA)

unread,
Apr 6, 2016, 8:10:01 AM4/6/16
to jenkinsc...@googlegroups.com

This behaviour has changed in newer versions of the plugin but it hasn't fixed my problem.

I have Dockerfile set to "Dockerfile.test.$

{flavour}

" and "path to docker context" left at the default of "."

Build fails with this error:

{{First time build. Skipping changelog.
Your project is missing a Dockerfile
FATAL: Interrupted
java.lang.RuntimeException: Interrupted
at com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.setUp(DockerBuildWrapper.java:171)
at hudson.model.Build$BuildExecution.doRun(Build.java:156)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1738)


at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
at hudson.model.ResourceController.execute(ResourceController.java:98)

at hudson.model.Executor.run(Executor.java:410)


Notifying upstream projects of job completion
Finished: FAILURE
}}

If I set Dockerfile to a static string pointing to the Dockerfile, it builds successfully.

Enabling the verbose option doesn't give me any more output about the situation.

nicolas.deloof@gmail.com (JIRA)

unread,
Apr 24, 2019, 10:30:43 AM4/24/19
to jenkinsc...@googlegroups.com
Nicolas De Loof assigned an issue to Unassigned
 
Change By: Nicolas De Loof
Assignee: Nicolas De Loof
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
Reply all
Reply to author
Forward
0 new messages