- I want to be able to check on the status of my previous build in a pipeline script
- CloudBees Jenkins Enterprise
This would be what your pipeline script would look like:
echo "last build failed"
This will check if the last build was a failure and then echo that the last build failed.
WARNING: Groovy sandbox has to be disabled for this to work because it is accessing the filesystem. RawBuild will also have to be whitelisted by the script security plugin once the Groovy sandbox is disabled.