[JIRA] (JENKINS-12918) a job dedicated to copyartifacts from a build specified by a build paramter (ie a run parameter) fails when launched manuallyco

179 views
Skip to first unread message

christopheM@java.net (JIRA)

unread,
Feb 28, 2012, 2:39:24 AM2/28/12
to jenkinsc...@googlegroups.com
christopheM created JENKINS-12918:
-------------------------------------

Summary: a job dedicated to copyartifacts from a build specified by a build paramter (ie a run parameter) fails when launched manuallyco
Key: JENKINS-12918
URL: https://issues.jenkins-ci.org/browse/JENKINS-12918
Project: Jenkins
Issue Type: Bug
Components: copyartifact
Environment: Jenkins ver. 1.450
copy artifacts plugin v1.21
Reporter: christopheM
Assignee: Alan Harder
Attachments: config.xml

The tested job is minimalist:

- it defines a Run parameter (named "IFW") to select a build from the job "IFW"
- it defines a "copy artifacts from another project" specified by a "build parameter", the parameter name beeing "IFW", and selectif the followinfg artifacts "**/*zip"

When manually launching the job, selecting the (succesful) last build of the IFW job, I got the following error:

FATAL: : only whitespace content allowed before start tag and not h (position: START_DOCUMENT seen h... @1:1)
com.thoughtworks.xstream.io.StreamException: : only whitespace content allowed before start tag and not h (position: START_DOCUMENT seen h... @1:1)
at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:78)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:154)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:147)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:126)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveDown(AbstractPullReader.java:111)
at com.thoughtworks.xstream.io.xml.XppReader.<init>(XppReader.java:48)
at com.thoughtworks.xstream.io.xml.XppDriver.createReader(XppDriver.java:44)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:856)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:848)
at hudson.plugins.copyartifact.BuildSelectorParameter.getSelectorFromXml(BuildSelectorParameter.java:81)
at hudson.plugins.copyartifact.ParameterizedBuildSelector.getBuild(ParameterizedBuildSelector.java:52)
at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:164)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:700)
at hudson.model.Build$RunnerImpl.build(Build.java:178)
at hudson.model.Build$RunnerImpl.doRun(Build.java:139)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:470)
at hudson.model.Run.run(Run.java:1409)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
Caused by: org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not h (position: START_DOCUMENT seen h... @1:1)
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:63)
... 20 more


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


me@shawnwilsher.com (JIRA)

unread,
Apr 24, 2012, 4:22:24 PM4/24/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-12918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=161985#comment-161985 ]

Shawn Wilsher commented on JENKINS-12918:
-----------------------------------------

This is happening for me for a manual job or one triggered by the parametrized build trigger plugin.



> a job dedicated to copyartifacts from a build specified by a build paramter (ie a run parameter) fails when launched manuallyco

> ---------------------------------------------------------------------------------------------------------------------------------

me@shawnwilsher.com (JIRA)

unread,
Apr 25, 2012, 2:52:24 PM4/25/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-12918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on JENKINS-12918 started by Alan Harder.

> a job dedicated to copyartifacts from a build specified by a build paramter (ie a run parameter) fails when launched manuallyco
> ---------------------------------------------------------------------------------------------------------------------------------

me@shawnwilsher.com (JIRA)

unread,
Apr 25, 2012, 3:27:25 PM4/25/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-12918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=162042#comment-162042 ]

Shawn Wilsher commented on JENKINS-12918:
-----------------------------------------

Oh, I see the issue that I and christopheM are running into. The "copy artifacts from another project" specified by a "build parameter" only works when your parameter is the copy artifacts parameter. What we both need is for the "specific build" to be able to parse environment variables.

> a job dedicated to copyartifacts from a build specified by a build paramter (ie a run parameter) fails when launched manuallyco
> ---------------------------------------------------------------------------------------------------------------------------------

me@shawnwilsher.com (JIRA)

unread,
Apr 25, 2012, 4:03:25 PM4/25/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-12918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=162047#comment-162047 ]

Shawn Wilsher commented on JENKINS-12918:
-----------------------------------------

The copy artifact plugin even properly escapes environment variables. The issue is that the variable that the RunParameter creates is just the job URL. It also creates two other variables which contain the job name and number, but those are not valid variables (https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Build?focusedCommentId=58001926#comment-58001926). If those were valid we should be able to just use those.

> a job dedicated to copyartifacts from a build specified by a build paramter (ie a run parameter) fails when launched manuallyco
> ---------------------------------------------------------------------------------------------------------------------------------

me@shawnwilsher.com (JIRA)

unread,
Apr 25, 2012, 4:05:24 PM4/25/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-12918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on JENKINS-12918 stopped by Shawn Wilsher.

> a job dedicated to copyartifacts from a build specified by a build paramter (ie a run parameter) fails when launched manuallyco
> ---------------------------------------------------------------------------------------------------------------------------------

mindless@java.net (JIRA)

unread,
Apr 29, 2012, 10:17:24 PM4/29/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-12918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=162200#comment-162200 ]

Alan Harder commented on JENKINS-12918:
---------------------------------------

I think there's some confusion on the purpose of the Run parameter.. it is for how to select a build, not about which project.. so this:

{{it defines a Run parameter (named "IFW") to select a build from the job "IFW"}}

is not possible. You simply define a build selector parameter named IFW and a default value.
When you add a Copy Artifact build step to the job you must specify the project to copy from (probably "IFW" in this case), and then for the build to select you can choose "from build parameter" and give "IFW" as the parameter name (using the name "IFW" for the build parameter is perhaps part of the confusion).

I just tried using a run parameter with Jenkins 1.461 and Copy Artifact 1.22, and didn't see any error. If you still see a problem, perhaps try in a different environment or setup and see if you can narrow down what factors cause the error.


> a job dedicated to copyartifacts from a build specified by a build paramter (ie a run parameter) fails when launched manuallyco
> ---------------------------------------------------------------------------------------------------------------------------------

mindless@java.net (JIRA)

unread,
Apr 29, 2012, 10:21:24 PM4/29/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-12918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=162201#comment-162201 ]

Alan Harder commented on JENKINS-12918:
---------------------------------------

oh, I was right there was confusion, but just now I figured out what it was... I see that "Run parameter" is one of the choices for the types of parameters you can add in a job, and indeed you can make one for picking a particular build from a particular project, like "IFW". Copy Artifact's "from build parameter" option does not support this type of parameter. It only supports the "Build selector for Copy Artifact" type of build parameter. You can select "specific build" here, but you have to type the build number.. you won't get a list of existing build numbers the way a "Run parameter" shows.

> a job dedicated to copyartifacts from a build specified by a build paramter (ie a run parameter) fails when launched manuallyco
> ---------------------------------------------------------------------------------------------------------------------------------

mindless@java.net (JIRA)

unread,
Apr 29, 2012, 10:23:24 PM4/29/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-12918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Harder resolved JENKINS-12918.
-----------------------------------

Resolution: Not A Defect

Closing. If you like you can file a feature request to support "Run parameter" for the build selector (though I have no plans to implement it).

> a job dedicated to copyartifacts from a build specified by a build paramter (ie a run parameter) fails when launched manuallyco
> ---------------------------------------------------------------------------------------------------------------------------------

adam@batkin.net (JIRA)

unread,
Mar 10, 2015, 4:24:34 PM3/10/15
to jenkinsc...@googlegroups.com
Adam Batkin commented on Bug JENKINS-12918

How is this not a defect? The error message gives no indication of what was wrong or where to even start debugging the issue. Literally the best you can do is Google the message and hope that you find this bug. Google should be the last resort, not the only option.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
Reply all
Reply to author
Forward
0 new messages