Possible to conditionally publish artifacts?#980

Subscribe to Possible to conditionally publish artifacts? 5 post(s), 2 voice(s)

 
Avatar Pete Mounce 47 post(s) #2644

Is it possible to publish artifacts only under some condition? For example, in the case of code coverage, I think I only want to publish a full report if the job fails because coverage is too low; if the job passes, then coverage was high enough, and so the summary report is enough to give us trend reporting.

If this is not possible now, I’d like it to be, please :)

 
Avatar Jez Humble Administrator 108 post(s) #2655

Hey Peter

You can do this in your build script—i.e. only copy the output to the directory if you want it published. I am not convinced this is something we’d want to make part of Cruise itself – I am pretty strongly opposed to putting programmatic stuff into the configuration file.

Jez.

 
Avatar Pete Mounce 47 post(s) #2661

Well, we could, but that would require work on our side rather than yours ;-)

In the Cruise config, all it would need is a flag to say something like “ShouldPublishWhenFailed” – or is that too slippery-slope-to-angle-bracket-programming? (An attitude I definitely identify with, by the way!)

 
Avatar Jez Humble Administrator 108 post(s) #2695

I can probably live with something like: publishOn=”all|failed|passed” (with all as the default).

I’ll stick it in the backlog.

 
Avatar Pete Mounce 47 post(s) #2761

That’s be sufficient; thanks.