Module: SemaphoreApi::Client::Builds

Included in:
SemaphoreApi::Client
Defined in:
lib/semaphore_api/client/builds.rb

Instance Method Summary collapse

Instance Method Details

#build(project_hash_id, branch_id, build_number) ⇒ Object


5
6
7
# File 'lib/semaphore_api/client/builds.rb', line 5

def build(project_hash_id, branch_id, build_number)
  get "/projects/#{project_hash_id}/#{branch_id}/builds/#{build_number}"
end

#build_log(project_hash_id, branch_id, build_number) ⇒ Object


9
10
11
# File 'lib/semaphore_api/client/builds.rb', line 9

def build_log(project_hash_id, branch_id, build_number)
  get "/projects/#{project_hash_id}/#{branch_id}/builds/#{build_number}/log"
end

#launch_build(project_hash_id, branch_id, options = {}) ⇒ Object


13
14
15
# File 'lib/semaphore_api/client/builds.rb', line 13

def launch_build(project_hash_id, branch_id, options = {})
  post "/projects/#{project_hash_id}/#{branch_id}/build"
end

#stop_build(project_hash_id, branch_id, build_number, options = {}) ⇒ Object


17
18
19
# File 'lib/semaphore_api/client/builds.rb', line 17

def stop_build(project_hash_id, branch_id, build_number, options = {})
  post "/projects/#{project_hash_id}/#{branch_id}/builds/#{build_number}/stop"
end