Class: BuildEval::Server::Jenkins

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

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Jenkins

Returns a new instance of Jenkins.


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

def initialize(args)
  @http     = BuildEval::Http.new(args)
  @base_uri = args[:uri]
end

Instance Method Details

#build_result(build_name, _branch_name) ⇒ Object


11
12
13
14
# File 'lib/build_eval/server/jenkins.rb', line 11

def build_result(build_name, _branch_name)
  raw_response = @http.get("#{@base_uri}/cc.xml")
  BuildEval::Server::CruiseControlResponse.new(raw_response).parse_result("//Project[@name=\"#{build_name}\"]")
end

#to_sObject


16
17
18
# File 'lib/build_eval/server/jenkins.rb', line 16

def to_s
  "Jenkins server #{@base_uri}"
end