Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A gem intending to consume jenkins(hudson) api easily

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 features
Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rvmrc
Octocat-spinner-32 Gemfile
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 jenkins-remote-api.gemspec
README.md

Jenkins Remote API

A gem aims at help you consume remote-access-api offered by Jenkins.

Why

The Jenkins exposes three kinds of api(xml/json/python) to outside users. And we might ask why we need to consume those data?

Well, for a large team(over 6~8 people), how to visualize the ci process status is very important. In opposite to the way that you manually go to Jenkins website and see the build status(positive), what if we can utilize Kanban methodology.That is to have a screen to show current ci status(passive but with knowledge radiation). Red means failure; Green means good/success;Blue means building in process.Maybe in further, we can buy The Hudson Bear Lamps to show build status.

But the prerequisite is that you need to consume the raw data offered by Jenkins api. So this gem will wrap around the raw api from Jenkins, let you make best of it to do thing better.

The following markups are supported. The dependencies listed are required if you wish to run the library.

Installation

gem install jenkins-remote-api

How to use

Commands from terminal

Yes, this gem use CLI(using Aruba) to add command line interface so that you can fire it up directly in terminal(cool). If you just want to play around with it, you probably don't even need to go to crazy "IRB" console^_^.

  • jenkins -h -- It will come up with help message.
  • jenkins list_all_job_names --ci_address http://ci.jruby.org/view/Ruboto/ -- It will list all jobs'name on Jenkins.
  • jenkins jobs_description --ci_address http://ci.jruby.org/view/Ruboto/ -- It will list all jobs description(name,url,status) on Jenkins.
  • jenkins current_status --job_name ruboto-core --ci_address http://ci.jruby.org/view/Ruboto/ -- It will list current building status of job you identified on Jenkins.

Usage in irb console

require 'rubygems'
require 'jenkins-remote-api'
jenkins = Ci::Jenkins.new("http://ci.jruby.org/view/Ruboto/")
jenkins.list_all_job_names
jenkins.jobs_description
jenkins.current_status_on_job "ruboto-core"
job = jenkins.job_named "ruboto-core"

Contribute

Want to contribute? Email to: clarkhtse@gmail.com

Something went wrong with that request. Please try again.