Class: Status::Jenkins

Inherits:
Object
  • Object
show all
Defined in:
lib/status/jenkins.rb

Instance Method Summary collapse

Constructor Details

#initialize(branch, sha = nil) ⇒ Jenkins

Returns a new instance of Jenkins.



6
7
8
9
# File 'lib/status/jenkins.rb', line 6

def initialize(branch, sha=nil)
  @branch = branch.gsub(/\//, "_")
  @sha = sha
end

Instance Method Details

#pass?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/status/jenkins.rb', line 19

def pass?
  status == "success"
end

#stateObject



15
16
17
# File 'lib/status/jenkins.rb', line 15

def state
  status
end

#target_urlObject



11
12
13
# File 'lib/status/jenkins.rb', line 11

def target_url
  build_url || "#{Status.ci_url}/job/#{@branch}"
end