Details
-
Type:
New Feature
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Component/s: copyartifact-plugin
-
Labels:None
-
Similar Issues:
Description
We would like to see support for iterating over all configurations and artifacts created by a matrix job.
A typical scenario:
1. Master Job do some init stuff
2. Master Job triggers:
2.1 Matrix job (with a large number of configurations)
2.2 Matrix job finishes
3. Master job now collects the artifacts from the matrix-job and do some post processing.
We need now to add a large amount of copy artifact steps in the master-job. Which is not really manageable.
It would be nice to have a build selector which iterates over all matrix configurations and copies the artifacts to the specified destination path.
How do you think this should work?
If you create a copy-artifact build step in a job and put a matrix job for the project name (without specifying /PARAM=VALUE to pick a particular configuration) then it could loop through all configs and copy stuff.. what if the output filenames in the different configurations conflict? They would overwrite eachother I guess.. I wonder if the target directory in the build step could somehow reference an axis value to create a unique subdir.
ie, Matrix job "foo" creates and archives "target/out.zip" in 3 different configurations, MYAXIS=abc, def or ghi.
downstream job has copy-artifact build step pointing to "foo" project with target directory "data/$MYAXIS".. it could then copy files to:
data/abc/target/out.zip
data/def/target/out.zip
data/ghi/target/out.zip
or "flatten" could be checked to omit the "target/" part of the path here.
This sounds nice, but parameter references here would be from params of THIS job, not axis values in the other job.. so not sure how to make this work cleanly if there are filename conflicts. I suppose it could automatically create subdirs base on the name of each matrix configuration.