diff options
author | Stan Hu <stanhu@gmail.com> | 2017-09-05 11:33:09 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-09-05 11:33:09 -0700 |
commit | 41e5ec8f74d9909050d54ae957b09a812a398c8e (patch) | |
tree | 8d07352840703d1421e53c2e8a595cd4da049842 /lib/api/runner.rb | |
parent | f045903541ace5cf4fd3c6e4a05ecfd264c1c621 (diff) | |
parent | 685066cd0e4bb9c2279c1ed43ae445d07c963743 (diff) | |
download | gitlab-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.rb | 4 |
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 |