Archiving artifacts not in the workspace when build fails

后端 未结 1 1575
伪装坚强ぢ
伪装坚强ぢ 2020-12-22 01:05

When an ANT build step fails in my build I\'d like to archive the logs in order to determine the problem. The relevant logs, however, are not located in the workspace, so I

相关标签:
1条回答
  • 2020-12-22 01:54

    I would recommend using Flexible Publish plugin in conjunction with the Conditional Build Step plugin.

    The Flexible Publish plugin allows you to schedule build steps AFTER the build steps have normally run. This allows you to catch both successful and failed builds and execute something - say a script that copies the files from OUTSIDE the workspace to INSIDE the workspace. The Conditional BuildSet plugin allows conditionalizing the steps so that they only run when the build fails. Using these two plugins, you can copy the files into the workspace upon failure, then archive them with the usual Jenkins mechanisms.

    0 讨论(0)
提交回复
热议问题