Skip to content
Snippets Groups Projects
Commit 79e1f33f authored by Alessio Caiazza's avatar Alessio Caiazza
Browse files

Expose GitLab features to the CI runner

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