lib/cicd/builder/mixlib/environment.rb in cicd-builder-0.9.15 vs lib/cicd/builder/mixlib/environment.rb in cicd-builder-0.9.16
- old
+ new
@@ -89,11 +89,11 @@
end
ret
end
# ---------------------------------------------------------------------------------------------------------------
- def saveEnvironment(ignored=['LS_COLORS','AWS_ACCESS_KEY_ID','AWS_SECRET_ACCESS_KEY'])
+ def saveEnvironment(ignored=ENV_IGNORED)
@logger.info "Save environment to #{@vars[:vars_fil]}"
vstr = ['[global]']
ENV.to_hash.sort.each{|k,v|
vstr << %(#{k}="#{v}") unless ignored.include?(k)
}
@@ -134,11 +134,11 @@
end
File.symlink(@vars[:build_pkg], @vars[:latest_pkg])
end
@logger.info "Save latest build info to #{@vars[:latest_fil]}"
IO.write(@vars[:latest_fil], "#{@vars[:build_ver]}\n#{@vars[:build_sha]}")
- saveEnvironment(['LS_COLORS','AWS_ACCESS_KEY_ID','AWS_SECRET_ACCESS_KEY'])
+ saveEnvironment(ENV_IGNORED)
# NOTE the '.note'!
@logger.note "CHANGE: #{ENV['JOB_NAME']} (#{@vars[:build_ver]}[#{@vars[:build_sha]}])"
else
@logger.info "Artifact #{@vars[:latest_pkg]} unchanged (#{@vars[:latest_ver]} [#{@vars[:latest_sha]}])"
@@ -160,10 +160,10 @@
@logger.error "FAILURE: #{ENV['JOB_NAME']} #{ENV['BUILD_NUMBER']} #{@vars[:build_pkg]} #{@vars[:return_code]}"
end
end
# ---------------------------------------------------------------------------------------------------------------
- def reportStatus(ignored=['AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY'])
+ def reportStatus(ignored=ENV_IGNORED)
# [2013-12-30 Christo] Report status,environment, etc.
if @logger.level < ::Logging::LEVELS['warn']
@logger.info '='*100
@logger.info Dir.getwd()
\ No newline at end of file