Class: CircleCi::Build

Inherits:
Object
  • Object
show all
Defined in:
lib/circleci/build.rb

Overview

Class for managing builds for a project

Class Method Summary collapse

Class Method Details

.artifacts(username, project, build) ⇒ CircleCi::Response

Get artifacts for a specific build of a project

Parameters:

  • username (String)
    • User or org name who owns project

  • project (String)
    • Name of project

  • build (String)
    • Build ID

Returns:



22
23
24
# File 'lib/circleci/build.rb', line 22

def self.artifacts username, project, build
  CircleCi.http.get "/project/#{username}/#{project}/#{build}/artifacts"
end

.cancel(username, project, build) ⇒ CircleCi::Response

Cancel a specific build

Parameters:

  • username (String)
    • User or org name who owns project

  • project (String)
    • Name of project

  • build (String)
    • Build ID

Returns:



35
36
37
# File 'lib/circleci/build.rb', line 35

def self.cancel username, project, build
  CircleCi.http.post "/project/#{username}/#{project}/#{build}/cancel"
end

.get(username, project, build) ⇒ CircleCi::Response

Get a specific build for a project

Parameters:

  • username (String)
    • User or org name who owns project

  • project (String)
    • Name of project

  • build (String)
    • Build ID

Returns:



48
49
50
# File 'lib/circleci/build.rb', line 48

def self.get username, project, build
  CircleCi.http.get "/project/#{username}/#{project}/#{build}"
end

.retry(username, project, build) ⇒ CircleCi::Response

Kick off a retry of a specific build

Parameters:

  • username (String)
    • User or org name who owns project

  • project (String)
    • Name of project

  • build (String)
    • Build ID

Returns:



61
62
63
# File 'lib/circleci/build.rb', line 61

def self.retry username, project, build
  CircleCi.http.post "/project/#{username}/#{project}/#{build}/retry"
end

.tests(username, project, build) ⇒ CircleCi::Response

Get tests for a specific build of a project

Parameters:

  • username (String)
    • User or org name who owns project

  • project (String)
    • Name of project

  • build (String)
    • Build ID

Returns:



74
75
76
# File 'lib/circleci/build.rb', line 74

def self.tests username, project, build
  CircleCi.http.get "/project/#{username}/#{project}/#{build}/tests"
end