Class: DTK::Client::JenkinsClient::Connection
- Inherits:
-
Hash
- Object
- Hash
- DTK::Client::JenkinsClient::Connection
- Defined in:
- lib/command_helpers/jenkins_client.rb
Instance Method Summary collapse
- #create_job(job_name, config_xml_contents) ⇒ Object
- #get_info ⇒ Object
- #get_jobs ⇒ Object
-
#initialize(connection_hash) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(connection_hash) ⇒ Connection
Returns a new instance of Connection.
71 72 73 74 75 |
# File 'lib/command_helpers/jenkins_client.rb', line 71 def initialize(connection_hash) super() merge!(connection_hash) set_connection() end |
Instance Method Details
#create_job(job_name, config_xml_contents) ⇒ Object
76 77 78 |
# File 'lib/command_helpers/jenkins_client.rb', line 76 def create_job(job_name,config_xml_contents) ::Jenkins::Client::Job.create(job_name, config_xml_contents) end |
#get_info ⇒ Object
80 81 82 |
# File 'lib/command_helpers/jenkins_client.rb', line 80 def get_info() get('api/json') end |
#get_jobs ⇒ Object
84 85 86 |
# File 'lib/command_helpers/jenkins_client.rb', line 84 def get_jobs() get_info()["jobs"] end |