Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-10502

Add an option to make archiving the artifacts non-fatal if they don't exist

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Jenkins 1.421

      If you tick the box to enable "Archive the artifacts", populate the "Files to archive", and your build fails to output those artifacts it will fail with something like this:

      12:11:51  Archiving artifacts
      12:11:51  ERROR: No artifacts found that match the file pattern "tfields/Live/Engine/Tools/Layout.*". Configuration error?
      12:11:57  ERROR: 'tfields/Live/Engine/Tools/Layout.*' doesn't match anything: 'tfields' exists but not 'tfields/Live/Engine/Tools/Layout.*'
      12:11:57  Build step 'Archive the artifacts' changed build result to FAILURE
      

      Depending on what your build actually does, those artifacts might not always be created. I'd like to propose that you add an option to make the archiving of artifacts non fatal.

      Thanks,
      Tom.

          [JENKINS-10502] Add an option to make archiving the artifacts non-fatal if they don't exist

          Thomas Fields created issue -

          I am using this option to record test artifacts which exist only when the test fails. Currently I have to place a dummy in the test screenshots directory, which is unpleasant.

          Robert Munteanu added a comment - I am using this option to record test artifacts which exist only when the test fails. Currently I have to place a dummy in the test screenshots directory, which is unpleasant.

          Thomas Fields added a comment -

          Can Jenkins core be updated to support my request? Does this issue need assigning to someone?

          Cheers,
          Tom.

          Thomas Fields added a comment - Can Jenkins core be updated to support my request? Does this issue need assigning to someone? Cheers, Tom.

          I'm in exactly the same situation as rombert. It would be great to have an option so the build does not fail automatically when there are no artifacts.

          David Santiago Turiño added a comment - I'm in exactly the same situation as rombert. It would be great to have an option so the build does not fail automatically when there are no artifacts.

          +1. This feature would be very useful.

          Stéphane Van Espen added a comment - +1. This feature would be very useful.

          Thomas Fields added a comment -

          If only I knew who to assign this to so it actually gets implemented.

          Thomas Fields added a comment - If only I knew who to assign this to so it actually gets implemented.

          lukas rytz added a comment -

          lukas rytz added a comment - check https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+properties for hudson.tasks.ArtifactArchiver.warnOnEmpty

          Thomas Fields added a comment -

          Thanks for that, it sounds like the biggest hack ever. We should be able to configure this on a project level and not globally for the whole system.

          Cheers,
          Tom.

          Thomas Fields added a comment - Thanks for that, it sounds like the biggest hack ever. We should be able to configure this on a project level and not globally for the whole system. Cheers, Tom.

          Tuukka Mustonen added a comment - - edited

          Same problem here. I set the hudson.tasks.ArtifactArchiver.warnOnEmpty to /etc/default/jenkins (came with jenkins debian-package) and it seems to work.

          Still, "optional" checkbox in job configuration would be nice.

          Tuukka Mustonen added a comment - - edited Same problem here. I set the hudson.tasks.ArtifactArchiver.warnOnEmpty to /etc/default/jenkins (came with jenkins debian-package) and it seems to work. Still, "optional" checkbox in job configuration would be nice.

          Dave Hunt added a comment -

          We're having this issue too. Screenshots are taken on failure, but when there are no failures (and no screenshots) the build fails anyway! It would be great if this could be configured on a per job basis rather than the global property mentioned above.

          Dave Hunt added a comment - We're having this issue too. Screenshots are taken on failure, but when there are no failures (and no screenshots) the build fails anyway! It would be great if this could be configured on a per job basis rather than the global property mentioned above.

            nacht Pedro Rodriguez
            tfields Thomas Fields
            Votes:
            16 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated:
              Resolved: