diff --git a/lib/build.rb b/lib/build.rb index 8475d06..3bed86b 100644 --- a/lib/build.rb +++ b/lib/build.rb @@ -14,6 +14,7 @@ class Build def initialize(data) @commands = data[:commands].to_a @ref = data[:ref] + @ref_name = data[:ref_name] @id = data[:id] @project_id = data[:project_id] @repo_url = data[:repo_url] @@ -95,6 +96,7 @@ def command(cmd) @process.environment['CI_SERVER_REVISION'] = nil# GitlabCi::Revision @process.environment['CI_BUILD_REF'] = @ref + @process.environment['CI_BUILD_REF_NAME'] = @ref_name @process.start diff --git a/lib/network.rb b/lib/network.rb index 042a706..8d3b299 100644 --- a/lib/network.rb +++ b/lib/network.rb @@ -34,6 +34,7 @@ def get_build commands: response['commands'].lines, repo_url: response['repo_url'], ref: response['sha'], + ref_name: response['ref'], } elsif response.code == 403 puts 'forbidden'