Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-23976

CopyArtifact plugin does not like incorrect build selector.

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: copyartifact-plugin
    • Labels:
      None
    • Environment:
      centos 6.4, jenkins LTS 1.532.3, copyartifact 1.30
    • Similar Issues:

      Description

      Steps to repro:

      • add manual promotion process to a dummy job
      • add copy artifacts from another project to promotion process
        • project name = $PROMOTED_JOB_FULL_NAME
        • which build = "specified by a build parameter"
        • parameter name = $PROMOTED_NUMBER
      FATAL:  : only whitespace content allowed before start tag and not 1 (position: START_DOCUMENT seen 1... @1:1) 
      com.thoughtworks.xstream.io.StreamException:  : only whitespace content allowed before start tag and not 1 (position: START_DOCUMENT seen 1... @1:1) 
      	at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:124)
      	at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:148)
      	at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:141)
      	at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:118)
      	at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveDown(AbstractPullReader.java:103)
      	at com.thoughtworks.xstream.io.xml.XppReader.<init>(XppReader.java:63)
      	at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:54)
      	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:916)
      	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:907)
      	at hudson.plugins.copyartifact.BuildSelectorParameter.getSelectorFromXml(BuildSelectorParameter.java:80)
      	at hudson.plugins.copyartifact.ParameterizedBuildSelector.getBuild(ParameterizedBuildSelector.java:52)
      	at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:263)
      	at hudson.plugins.promoted_builds.Promotion$RunnerImpl.build(Promotion.java:281)
      	at hudson.plugins.promoted_builds.Promotion$RunnerImpl.doRun(Promotion.java:223)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:566)
      	at hudson.model.Run.execute(Run.java:1665)
      	at hudson.model.Run.run(Run.java:1612)
      	at hudson.plugins.promoted_builds.Promotion.run(Promotion.java:173)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:246)
      Caused by: org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not 1 (position: START_DOCUMENT seen 1... @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:109)
      	... 19 more
      

      This is a user error, I should have picked "specific build" in order to use $PROMOTED_NUMBER. Validation during the job configuration would have helped
      in this case make things more fool-proof.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dnozay Damien Nozay
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: