Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Component/s: conditional-buildstep-plugin, copyartifact-plugin
-
Labels:None
-
Similar Issues:
Description
When artifacts are copied through a conditional build setup, the build number environment variable (e.g. COPYARTIFACT_BUILD_NUMBER_...) does not get propagated (or is not visible) to the remaining build steps.
Attachments
Issue Links
- is related to
-
JENKINS-16028 COPYARTIFACT_BUILD_NUMBER_ is not set when copyartifact plugin is ran as Maven pre-build
-
- Closed
-
I think the issue is in the copyartifact plugin at CopyArtifact.onStarted() : https://github.com/jenkinsci/copyartifact-plugin/blob/master/src/main/java/hudson/plugins/copyartifact/CopyArtifact.java#L376-L379
This method will not find a CopyArtifact.class in the BuildersList, as in our case the objects are wrapped in the 'org.jenkinsci.plugins.conditionalbuildstep.BuilderChain' and/or 'org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder'
don't know how to fix this yet, therefore assigning it to the maintainer of the copyartifact plugin, maybe Jesse has an idea...