Conditional task execution
At times there are certain steps you need to execute only when you know that the build has already failed. For example, when a test suite fails you might want to output additional environment information to the console output
Using web interface
Check the appropriate Run if conditions when defining the Task
Using XML configuration
Usage: As a developer, I want to run a task only when the build has already failed.
- On the Administration Tab, edit the jobs that should run a task when the build has failed
- Ensure the following “task” block is in the job configuration
- Now we will get extra output only when the tests fail!