Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
AutoJenkins: Ruby library to interact with Jenkins CI
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
lib
tests
.gitignore
README.md
autojenkins.gemspec

README.md

autojenkins-rb

Ruby API, wrappers and command-line client for Jenkins CI.

This tool can let you make calls to a Jenkins CI server to create, delete, build and query build projects.

Usage

You need to have a file, called mjenk in your $HOME (or specify it in the command-line tool)

URL: http://ci.jenkins.org 
USER: username
PASSWD: [APIkey for the user, dont use your password]

Once that file is created, you can use the mjenk utility to interact with the server:

To build a project:

$ mjenk job -B -j JobName

To delete a project

$ mjenk job -d -j JobName

To list all projects

$ mjenk job

Note: mjenk accepts a command as the first argument. In the examples above, we use 'job'. The idea in the future is to add other commands in mjenk to do more things, like interact with a vcs or other things. If no command is specified when calling mjenk, it defaults to 'job'.

Examples

Check out lib/tests.rb for some code examples to do stuff like:

  • List all jobs (ListAll)
  • Create jobs using other jobs as templates (CreateFromJob)
  • Get information from a Build (GetBuildInfo)
  • Get Job configuration as XML (GetConfig)
  • Get Job information (GetInfo)
Something went wrong with that request. Please try again.