Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins Build fails when artifacts are not there

I use Jenkins to run some integration tests on a web appilcation (using cucumber, capybara and selenium)

Everytime a test fails, a screenshot, the HTML source and a video of the process is saved.

the path structure looks like this:

results/output/<test_name>/<files>

I use the archive artifacts feature of Jenkins to provide the files (pattern: results/output/*/*). It works great.

However as soon as a build succeeds, there are no screenshots/videos etc... and the build fails because Jenkins cannot find the files for the pattern.

Is there a way to tell Jenkins to succeed without having the files present?

I don't want to do a dirty hack which involves creating an empty folder structure like result/output/success/hooray.txt.

like image 432
leifg Avatar asked Dec 23 '11 14:12

leifg


1 Answers

There's an open issue on for that: https://issues.jenkins-ci.org/browse/JENKINS-10502

The behavior is controlled by the system property hudson.tasks.ArtifactArchiver.warnOnEmpty, as explained on https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+properties

like image 198
Lukas Rytz Avatar answered Sep 27 '22 23:09

Lukas Rytz