Archiving artifacts off-stage when assembly fails

When the ANT build step fails in my build, I would like to archive the logs to identify the problem. However, the relevant logs are not in the workspace, so I have to use the full path to them.

The standard function for archiving artifacts does not work with full paths, so first I need to copy the logs to the workspace at some assembly step, so that later they can be archived. I do not want to include the copy code in the original ANT script (it really does not belong). On the other hand, since the build step will not work, I cannot execute code that copies artifacts to the workspace as a separate build step because it has never been reached.

I am considering using the ANT option -keep-going, but how can I fail the build?

Any other ideas (artifact plugins that correctly handle full paths)?

Update . I worked on the problem by creating a symlink in the workspace to a directory containing the files that need to be archived. Kludgy but effective.

0
source share
1 answer

I would recommend using Flexible Publish in conjunction with conditional assembly Step .

Flexible Publish , . , - - , script, . Conditional BuildSet , . , , Jenkins.

+3

All Articles