Commit 79e1f33f authored by Alessio Caiazza's avatar Alessio Caiazza

Expose GitLab features to the CI runner

parent 57094085
...@@ -229,6 +229,10 @@ module Ci ...@@ -229,6 +229,10 @@ module Ci
variables variables
end end
def features
{ trace_sections: true }
end
def merge_request def merge_request
return @merge_request if defined?(@merge_request) return @merge_request if defined?(@merge_request)
......
...@@ -1020,6 +1020,7 @@ module API ...@@ -1020,6 +1020,7 @@ module API
expose :cache, using: Cache expose :cache, using: Cache
expose :credentials, using: Credentials expose :credentials, using: Credentials
expose :dependencies, using: Dependency expose :dependencies, using: Dependency
expose :features
end end
end end
......
...@@ -360,6 +360,8 @@ describe API::Runner do ...@@ -360,6 +360,8 @@ describe API::Runner do
'policy' => 'pull-push' }] 'policy' => 'pull-push' }]
end end
let(:expected_features) { { 'trace_sections' => true } }
it 'picks a job' do it 'picks a job' do
request_job info: { platform: :darwin } request_job info: { platform: :darwin }
...@@ -379,6 +381,7 @@ describe API::Runner do ...@@ -379,6 +381,7 @@ describe API::Runner do
expect(json_response['artifacts']).to eq(expected_artifacts) expect(json_response['artifacts']).to eq(expected_artifacts)
expect(json_response['cache']).to eq(expected_cache) expect(json_response['cache']).to eq(expected_cache)
expect(json_response['variables']).to include(*expected_variables) expect(json_response['variables']).to include(*expected_variables)
expect(json_response['features']).to eq(expected_features)
end end
context 'when job is made for tag' do context 'when job is made for tag' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment