summaryrefslogtreecommitdiff
path: root/lib/api/runner.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-09-05 11:33:09 -0700
committerStan Hu <stanhu@gmail.com>2017-09-05 11:33:09 -0700
commit41e5ec8f74d9909050d54ae957b09a812a398c8e (patch)
tree8d07352840703d1421e53c2e8a595cd4da049842 /lib/api/runner.rb
parentf045903541ace5cf4fd3c6e4a05ecfd264c1c621 (diff)
parent685066cd0e4bb9c2279c1ed43ae445d07c963743 (diff)
downloadgitlab-ce-41e5ec8f74d9909050d54ae957b09a812a398c8e.tar.gz
Merge branch 'master' into sh-headless-chrome-support
Diffstat (limited to 'lib/api/runner.rb')
-rw-r--r--lib/api/runner.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/runner.rb b/lib/api/runner.rb
index 11999354594..a3987c560dd 100644
--- a/lib/api/runner.rb
+++ b/lib/api/runner.rb
@@ -114,6 +114,8 @@ module API
requires :id, type: Integer, desc: %q(Job's ID)
optional :trace, type: String, desc: %q(Job's full trace)
optional :state, type: String, desc: %q(Job's status: success, failed)
+ optional :failure_reason, type: String, values: CommitStatus.failure_reasons.keys,
+ desc: %q(Job's failure_reason)
end
put '/:id' do
job = authenticate_job!
@@ -127,7 +129,7 @@ module API
when 'success'
job.success
when 'failed'
- job.drop
+ job.drop(params[:failure_reason] || :unknown_failure)
end
end