Module: Gitlab::CI::Client::Builds
- Included in:
- Gitlab::CI::Client
- Defined in:
- lib/gitlab/ci/client/builds.rb
Overview
Defines methods related to builds.
Instance Method Summary collapse
-
#register_build(token) ⇒ Array<Gitlab::ObjectifiedHash>
Runs oldest pending build by runner.
-
#update_build(id, state = nil, trace = nil) ⇒ Gitlab::ObjectifiedHash
Update details of an existing build.
Instance Method Details
#register_build(token) ⇒ Array<Gitlab::ObjectifiedHash>
Runs oldest pending build by runner
12 13 14 |
# File 'lib/gitlab/ci/client/builds.rb', line 12 def register_build(token) post("/builds/register", body: { token: token }) end |
#update_build(id, state = nil, trace = nil) ⇒ Gitlab::ObjectifiedHash
Update details of an existing build
25 26 27 28 29 30 31 |
# File 'lib/gitlab/ci/client/builds.rb', line 25 def update_build(id, state=nil, trace=nil) if state or trace put("/builds/#{id}", body: { state: state, trace: trace }) else "{}" end end |