jenkins-ruby is a suite of Ruby classes that help to connect and automate different tasks on Jenkins CI through its Remote Access API.
Setup your Jenkins as following:
Jenkins.configure(options)
where options is a Hash
with following keys:
options = (
host: 'jenkins_host', # required
port: 8080, # optional, default is 8080
username: 'username', # required
password: 'password' # required
)
Configuration from .yml file will be added soon!
After configuring Jenkin, a job can be created as following:
job = Jenkins::Job.new('job_name')
job #=> #<Jenkins::Job:0x007fac429493f0>
If you want to search for a job:
job = Jenkins::Job.find('existing_job')
job #=> #<Jenkins::Job:0x007fac41d0e630>
job = Jenkins::Job.find('non_existing_job')
job #=> nil
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request