[JIRA] (JENKINS-40417) COPY command with multiple source file fails

3 views
Skip to first unread message

balint.bako@live.com (JIRA)

unread,
Dec 13, 2016, 11:43:01 AM12/13/16
to jenkinsc...@googlegroups.com
Balint Bako created an issue
 
Jenkins / Bug JENKINS-40417
COPY command with multiple source file fails
Issue Type: Bug Bug
Assignee: vjuranek
Components: docker-build-step-plugin
Created: 2016/Dec/13 4:42 PM
Labels: docker-build-step docker
Priority: Minor Minor
Reporter: Balint Bako

I have a Docker file with the following COPY command:
COPY bin/server.crt bin/server.key /etc/httpd/ssl/

I get the following exception on build:
_ERROR: Build step failed with exception
java.lang.RuntimeException: java.lang.ClassCastException: org.glassfish.json.JsonObjectBuilderImpl$JsonObjectImpl cannot be cast to javax.json.JsonString
at org.jenkinsci.plugins.dockerbuildstep.cmd.CreateImageCommand.execute(CreateImageCommand.java:139)
at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder.perform(DockerBuilder.java:75)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.Build$BuildExecution.build(Build.java:205)
at hudson.model.Build$BuildExecution.doRun(Build.java:162)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1720)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Caused by: java.lang.ClassCastException: org.glassfish.json.JsonObjectBuilderImpl$JsonObjectImpl cannot be cast to javax.json.JsonString
at org.glassfish.json.JsonObjectBuilderImpl$JsonObjectImpl.getJsonString(JsonObjectBuilderImpl.java:194)
at org.glassfish.json.JsonObjectBuilderImpl$JsonObjectImpl.getString(JsonObjectBuilderImpl.java:199)
at org.jenkinsci.plugins.dockerbuildstep.cmd.CreateImageCommand$1.callback(CreateImageCommand.java:123)
at org.jenkinsci.plugins.dockerbuildstep.cmd.CreateImageCommand.readJsonStream(CreateImageCommand.java:161)
at org.jenkinsci.plugins.dockerbuildstep.cmd.CreateImageCommand.execute(CreateImageCommand.java:115)
... 10 more
Build step 'Execute Docker command' marked build as failure
Finished: FAILURE_

If I split the COPY into 2 separate commands then it works fine.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

mattedgod@gmail.com (JIRA)

unread,
Feb 1, 2017, 8:21:01 PM2/1/17
to jenkinsc...@googlegroups.com
Matt Dodge commented on Bug JENKINS-40417
 
Re: COPY command with multiple source file fails

This was happening to me too but updating the plugin solved it for me. I was on 1.35 but now on 1.38 the issue doesn't seem to occur.

Reply all
Reply to author
Forward
0 new messages