Class: Ci::Jenkins
- Inherits:
-
Object
- Object
- Ci::Jenkins
- Includes:
- XmlHelper, LibXML
- Defined in:
- lib/jenkins-remote-api/ci/jenkins.rb
Instance Attribute Summary collapse
-
#ci_address ⇒ Object
Returns the value of attribute ci_address.
Instance Method Summary collapse
- #current_status_on_job(job_name) ⇒ Object
-
#initialize(url) ⇒ Jenkins
constructor
A new instance of Jenkins.
- #job_named(job_name) ⇒ Object
- #jobs ⇒ Object
- #jobs_description ⇒ Object
- #list_all_job_names ⇒ Object
Constructor Details
#initialize(url) ⇒ Jenkins
Returns a new instance of Jenkins.
12 13 14 |
# File 'lib/jenkins-remote-api/ci/jenkins.rb', line 12 def initialize url @ci_address = url end |
Instance Attribute Details
#ci_address ⇒ Object
Returns the value of attribute ci_address.
10 11 12 |
# File 'lib/jenkins-remote-api/ci/jenkins.rb', line 10 def ci_address @ci_address end |
Instance Method Details
#current_status_on_job(job_name) ⇒ Object
39 40 41 |
# File 'lib/jenkins-remote-api/ci/jenkins.rb', line 39 def current_status_on_job job_name get_job_summary_on(job_name)[:description][:status] end |
#job_named(job_name) ⇒ Object
27 28 29 |
# File 'lib/jenkins-remote-api/ci/jenkins.rb', line 27 def job_named job_name get_job_summary_on(job_name)[:job] end |
#jobs ⇒ Object
31 32 33 |
# File 'lib/jenkins-remote-api/ci/jenkins.rb', line 31 def jobs jobs_summary.collect{ |job_info| job_info[:job]} end |
#jobs_description ⇒ Object
35 36 37 |
# File 'lib/jenkins-remote-api/ci/jenkins.rb', line 35 def jobs_description jobs_summary.collect{ |job_info| job_info[:description]} end |
#list_all_job_names ⇒ Object
23 24 25 |
# File 'lib/jenkins-remote-api/ci/jenkins.rb', line 23 def list_all_job_names jobs_summary.collect{ |job_summary| job_summary[:description][:name]} end |