Local mode modification done previously faulty. env[‘WORKSPACE’ is not
the sufficient discriminator to see if script is running under Jenkins.
This fails on the Jenkins parent jobs since those type of jobs don’t
have WORKSPACE set.
We currently run always with SecurityManager installed. To make sure we
work also without we should randomly swap it out ie. run without the
security manager.
1) add build_desc property variable
2) use build_id plus build_number as an unique file name
3) tools subdirectory should be under current PWD when the script is
executing