sct/lib/sct/commands/databasepull.rb in sct-1.0.8 vs sct/lib/sct/commands/databasepull.rb in sct-1.0.9

- old
+ new

@@ -4,11 +4,14 @@ UI.error message exit 1 end def execute args, options - branch = ENV['CI_BRANCH'] || 'master' + branch = ENV['CI_BRANCH'] + if not branch or branch == "" + branch = 'master' + end # We need to set this locally, so that we don't save this at the repository pipeline_endpoint = ENV['CI_MERGE_REQUEST_PIPELINE'] if not pipeline_endpoint error "Pipeline endpoint not set" @@ -20,15 +23,15 @@ error "Private token not set" end if options.proactive_frame UI.important("Requesting to pull database for proactive frame") - process_request = `curl -X POST -F token=#{private_token} -F ref=#{branch} -F variables[DB_PULL_FRAME]=true #{pipeline_endpoint}` + process_request = `curl -X POST -F token=#{private_token} -F ref=master -F variables[DB_PULL_FRAME]=true -F variables[REMOTE_BRANCH_NAME]=#{branch} #{pipeline_endpoint}` end if options.proactive_config UI.important("Requesting to pull database for proactive config") - process_request = `curl -X POST -F token=#{private_token} -F ref=#{branch} -F variables[DB_PULL_CONFIG]=true #{pipeline_endpoint}` + process_request = `curl -X POST -F token=#{private_token} -F ref=master -F variables[DB_PULL_CONFIG]=true -F variables[REMOTE_BRANCH_NAME]=#{branch} #{pipeline_endpoint}` end end end end