diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-02-19 17:21:00 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-03-28 13:55:46 +0200 |
commit | 7b82f4bab1661d7f7e7cb044730c977329275240 (patch) | |
tree | 9ef9ed1c20b2e1391e2f5446ae9800446528f557 /lib/api | |
parent | fb0dec4e00f1efd637692982ba031f479103cc35 (diff) | |
download | gitlab-ce-7b82f4bab1661d7f7e7cb044730c977329275240.tar.gz |
Add support for job_upper_timeout in API
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/entities.rb | 1 | ||||
-rw-r--r-- | lib/api/runner.rb | 3 | ||||
-rw-r--r-- | lib/api/runners.rb | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 16147ee90c9..becd4f22a03 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -951,6 +951,7 @@ module API expose :tag_list expose :run_untagged expose :locked + expose :job_upper_timeout expose :access_level expose :version, :revision, :platform, :architecture expose :contacted_at diff --git a/lib/api/runner.rb b/lib/api/runner.rb index 8da97a97754..14dd3b81dd0 100644 --- a/lib/api/runner.rb +++ b/lib/api/runner.rb @@ -14,9 +14,10 @@ module API optional :locked, type: Boolean, desc: 'Should Runner be locked for current project' optional :run_untagged, type: Boolean, desc: 'Should Runner handle untagged jobs' optional :tag_list, type: Array[String], desc: %q(List of Runner's tags) + optional :job_upper_timeout, type: Integer, desc: 'Upper timeout set when this Runner will handle the job' end post '/' do - attributes = attributes_for_keys([:description, :locked, :run_untagged, :tag_list]) + attributes = attributes_for_keys([:description, :locked, :run_untagged, :tag_list, :job_upper_timeout]) .merge(get_runner_details_from_request) runner = diff --git a/lib/api/runners.rb b/lib/api/runners.rb index 996457c5dfe..bc91b7cfd54 100644 --- a/lib/api/runners.rb +++ b/lib/api/runners.rb @@ -57,6 +57,7 @@ module API optional :locked, type: Boolean, desc: 'Flag indicating the runner is locked' optional :access_level, type: String, values: Ci::Runner.access_levels.keys, desc: 'The access_level of the runner' + optional :job_upper_timeout, type: Integer, desc: 'Upper timeout set when this Runner will handle the job' at_least_one_of :description, :active, :tag_list, :run_untagged, :locked, :access_level end put ':id' do |