lib/cicd/builder/mixlib/environment.rb in cicd-builder-0.9.57 vs lib/cicd/builder/mixlib/environment.rb in cicd-builder-0.9.58

- old
+ new

@@ -63,12 +63,14 @@ if ENV.has_key?('BUILD_STORE') @vars[:build_store] = "#{ENV['BUILD_STORE']}" end - if ENV.has_key?('BRANCH') - @vars[:branch] = "#{ENV['BRANCH'].gsub(%r'\/','.')}" + if ENV.has_key?('GIT_BRANCH') + @vars[:branch] = "#{ENV['GIT_BRANCH'].gsub(%r'^(refs/[^/]?|origin)/','').gsub(%r'\/','.')}" + elsif ENV.has_key?('BRANCH') + @vars[:branch] = "#{ENV['BRANCH'].gsub(%r'\/','.')}" end if ENV.has_key?('VARIANT') @vars[:variant] = "#{ENV['VARIANT']}" end @@ -78,10 +80,10 @@ end if ENV.has_key?('ACTIONS') @vars[:actions] = ENV['ACTIONS'].split(%r'[, \t]+') else - @vars[:actions] = %w(prepareBuild makeBuild saveBuild uploadBuildArtifacts) + @vars[:actions] = %w(prepareBuild makeBuild saveBuild uploadBuildArtifacts cleanupAfterUpload) end if ENV.has_key?('TREE') @vars[:tree] = ENV['TREE'] end \ No newline at end of file