fix if hook failure when running under jenkins

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.
This commit is contained in:
mrsolo 2014-01-24 15:59:48 -08:00
parent d4f0323917
commit 9a37922e57
1 changed files with 2 additions and 5 deletions

View File

@ -98,11 +98,8 @@ def generate_property_file(directory, data)
end
end
if(ENV['WORKSPACE'])
#jenkin mode
working_directory = ENV['WORKSPACE']
else
working_directory = ENV['WORKSPACE'] || '/var/tmp'
unless(ENV['BUILD_ID'])
#local mode set up fake environment
test_directory = 'tools/hudson.model.JDK/'
unless(File.exist?(test_directory))