Module: SemaphoreApi::Client::Deploys

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

Instance Method Summary collapse

Instance Method Details

#deploy(project_hash_id, server_id, depoy_number) ⇒ Object



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

def deploy(project_hash_id, server_id, depoy_number)
  get "/projects/#{project_hash_id}/servers/#{server_id}/deploys/#{deploy_number}"
end

#deploy_log(project_hash_id, server_id, depoy_number) ⇒ Object



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

def deploy_log(project_hash_id, server_id, depoy_number)
  get "/projects/#{project_hash_id}/servers/#{server_id}/deploys/#{deploy_number}/log"
end

#launch_deploy(project_hash_id, branch_id, build_number, server_id, depoy_number, options = {}) ⇒ Object



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

def launch_deploy(project_hash_id, branch_id, build_number, server_id, depoy_number, options = {})
  post "/projects/#{project_hash_id}/#{branch_id}/builds/#{build_number}/deploy/#{server_id}", options
end

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



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

def stop_deploy(project_hash_id, branch_id, deploy_number, options = {})
  post "/projects/#{project_hash_id}/#{branch_id}/deploys/#{deploy_number}/stop", options
end