I am copying artifacts from a matrix testing build to enforce only sending artifacts that pass the tests between my compile and package builds. This means every build in the matrix "produces" identical artifacts, which are actually just copied from the compiler build. I am not using a direct "build after tests" trigger for packaging as I only want it to run twice a day, not every time the tests run.
If there's a better way to achieve that, I'm happy to change, but it seemed like the most obvious route.
Rather than getting 21 copies of identical artifacts I'm using a specific configuration selector. I have both "last successful build" and "stable build only" checked. Plugin version 1.18.
If the matrix build is marked as unstable due to one or more of the configurations having failing tests, but the specific configuration I am copying from passed, the copy artifact plugin doesn't complain. It ignores the overall matrix state and only checks the build state of the specific configuration.
Is this a bug, or by design?
I am investigating two workarounds in the meantime:
- Put up with copying all 21 configurations (that's over 400mb though)
- Create an extra build in the middle, triggered by the tests, that just acts as an artifact passthrough and packaging copies artifacts from there. This build would use a direct trigger and therefore only run when the tests pass.