diff options
author | Alessio Caiazza <acaiazza@gitlab.com> | 2017-09-27 16:01:33 +0200 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2017-10-03 11:35:23 +0200 |
commit | 79e1f33f13095e3781bc3fc07efd52921c4ed756 (patch) | |
tree | 92e7f9a6c95d687b7136e45954c68889ef93d6c7 | |
parent | 570940858599fb2f4e5410b9a6743a0aeb0a09e7 (diff) | |
download | gitlab-ce-37970-timestamped-ci.tar.gz |
Expose GitLab features to the CI runner37970-timestamped-ci
-rw-r--r-- | app/models/ci/build.rb | 4 | ||||
-rw-r--r-- | lib/api/entities.rb | 1 | ||||
-rw-r--r-- | spec/requests/api/runner_spec.rb | 3 |
3 files changed, 8 insertions, 0 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index ee544d8ac56..dd315866e60 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -229,6 +229,10 @@ module Ci variables end + def features + { trace_sections: true } + end + def merge_request return @merge_request if defined?(@merge_request) diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 71253f72533..a0b87f320a4 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -1020,6 +1020,7 @@ module API expose :cache, using: Cache expose :credentials, using: Credentials expose :dependencies, using: Dependency + expose :features end end diff --git a/spec/requests/api/runner_spec.rb b/spec/requests/api/runner_spec.rb index 12720355a6d..5068df5b43a 100644 --- a/spec/requests/api/runner_spec.rb +++ b/spec/requests/api/runner_spec.rb @@ -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 |