On Friday, March 8, 2013 12:45:24 PM UTC-5, old hooky wrote:
>
> Quoting Christian Baumann <bau...@eudemonia-solutions.de <javascript:>>: 
>
> > -----BEGIN PGP SIGNED MESSAGE----- 
> > Hash: SHA1 
> > 
> > Hi! 
> > 
> > I am running Selenium tests that capture a screenshot whenever a test 
> > fails. Now, I would like to publish these screenshots as artifacts. 
> > 
> > However, if no test failed and thus no screenshots were taken, the job 
> > itself fails. I tried to specify the inclusion pattern as 'log/*', but 
> > that didn't help. 
> > 
> > How would you publish optional artifacts in Jenkins? 
>
> https://wiki.jenkins-ci.org/display/JENKINS/Flexible+Publish+Plugin :-) 
>
 

As it happens, I have exactly the same use case and encountered exactly the 
same problem and have just solved it with the Flexible Publish Plugin just 
as old hooky suggests. The timing is incredible as I observed a Jenkins job 
fail and save the screenshot correctly for the first time just as I started 
to write this reply.

I will add one caveat: You must use the "Files Match" condition in a 
Flexible publish action. At first, I used a "Files exist" condition and 
eventually realized that only does exact file name matches.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to