Expose GitLab features to the CI runner
This commit is contained in:
parent
5709408585
commit
79e1f33f13
|
@ -229,6 +229,10 @@ module Ci
|
|||
variables
|
||||
end
|
||||
|
||||
def features
|
||||
{ trace_sections: true }
|
||||
end
|
||||
|
||||
def merge_request
|
||||
return @merge_request if defined?(@merge_request)
|
||||
|
||||
|
|
|
@ -1020,6 +1020,7 @@ module API
|
|||
expose :cache, using: Cache
|
||||
expose :credentials, using: Credentials
|
||||
expose :dependencies, using: Dependency
|
||||
expose :features
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -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 }
|
||||
|
||||
|
@ -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…
Reference in New Issue