Is there any documentation/examples on the Copy Artifacts Plugin, namely the "Specified by a build parameter" option?
I'm trying to do a "join-diamond" pipeline such as in this SO question and can't figure out what to put in the Parameter Name
option of the "Copy artifacts from another project" build step to get my artifacts copied properly.
All my jobs have a PL_BUILD_NUMBER
parameter and I'd like to use it to select which build to copy the artifacts from.
This mailing list post says the parameter must be an XML. So I tried this :
BUILD_SELECTOR=<SpecificBuildSelector><buildNumber>$PL_BUILD_NUMBER</buildNumber></SpecificBuildSelector>
but it did not work. I get this exception in the log:
java.lang.NullPointerException
at java.io.StringReader.<init>(Unknown Source)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1035)
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:280)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:772)
at hudson.model.Build$BuildExecution.build(Build.java:199)
at hudson.model.Build$BuildExecution.doRun(Build.java:160)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:535)
at hudson.model.Run.execute(Run.java:1740)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:233)
What should I put?
There's also the "This build is parametrized --> Build selector for Copy Artifact" that I don't know if I should use it...
Thanks!