Jenkins Build fails when artifacts are not there

artifactscontinuous integrationhudsonJenkins

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.

Best Answer

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

Related Topic