summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/ci/build.rb4
-rw-r--r--lib/api/entities.rb1
-rw-r--r--spec/requests/api/runner_spec.rb3
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