0
votes

"Archive the artifacts" Jenkins post build action is running for 5 minutes:

21:58:26 WARN: No artifacts found that match the file pattern "direct/path/to/non-existing.artifact". Configuration error?
22:03:55 WARN: ?direct/path/to/non-existing.artifact? doesn?t match anything: ?direct? exists but not ?direct/path/to/non-existing.artifact?

This is not a configuration error and I just want to skip the artifact archiving if there is no artifact produced. Is there a way to do this? Is there some known explanation of this phenomenon? I'd assume that Jenkins tries to search the workspace for something similar to pattern and since the workspace is large, depending on the algorithm it is theoretically possible for search to take 5 minutes.

1
find . | wc -l in workspace? How do you run Jenkins? Probably you are giving it too low memory? - Stan E
find . | wc -l prints 141494 . -xmx3g for ssh Linux slave , -xmx4g for master. At the moment when search occurs the memory is all free to grab, so 'premanent' GC shouldn't be the issue, I think. - Zloj
One way to avoid the lenghty $WORKSPACE search is to create a dummy artifact. - Zloj
Is that a statement?:) - Stan E

1 Answers

0
votes

You can use Flexible Publish plugin to setup post-build conditions. Configure it to execute "Archive Artifacts" only if build was successful or whatever your condition happens to be