Class: Jenkins::CLI
- Inherits:
-
Thor
- Object
- Thor
- Jenkins::CLI
- Defined in:
- lib/jenkins-remote-api/cli.rb
Instance Method Summary collapse
- #ci_address_to(url) ⇒ Object
- #current_status ⇒ Object
- #jobs_description ⇒ Object
- #list_all_job_names ⇒ Object
Instance Method Details
#ci_address_to(url) ⇒ Object
9 10 11 12 |
# File 'lib/jenkins-remote-api/cli.rb', line 9 def ci_address_to url jenkins = Ci::Jenkins.new url puts jenkins.ci_address end |
#current_status ⇒ Object
37 38 39 40 41 |
# File 'lib/jenkins-remote-api/cli.rb', line 37 def current_status jenkins = Ci::Jenkins.new [:ci_address] status = jenkins.current_status_on_job [:job_name] puts table(['Job Name', 'Status'], *([[[:job_name], status]])) end |
#jobs_description ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/jenkins-remote-api/cli.rb', line 23 def jobs_description jenkins = Ci::Jenkins.new [:ci_address] job_description_table = table do |t| t.headings = 'Job Name', 'Job Status', 'Job URL' jenkins.jobs_description.each do |job_desc| t << job_desc.values end end puts job_description_table end |