Jenkins : Jenkow JobResultConsumption

The JobResultConsumption unit test exhibits the consumption of a job result. The test creates a launchy job which fails on even build numbers (just to have a job which fails first and succeeds the second time):

echo "launchy running"
sleep 5
exit $((BUILD_NUMBER%2!=0))

The launchy job is called by the Run Launchy Jenkins Task.

Failure Case

In the "failure" branch of the exclusive gateway there's the condition which uses the expression job.get("launch").getLastBuildResult() to access the last build result of launchy:

Success Case

In the "success" branch of the exclusive gateway there's the complementary condition:

Attachments:

20121205-1845.png (image/png)
20121205-1847.png (image/png)
20121205-1941.png (image/png)