Node client for the Jenkins API
npm install --save hjerling/node-jenkins
var Jenkins = require('node-jenkins');
var jenkins = new Jenkins('http://jenkins.org');
jenkins.lastBuildInfo('ibl', function (err, buildInfo) {
if (err) return console.error(err.message);
console.log('Last build result for ibl is ' + buildInfo.result);
});Create a new Jenkins client.
- Request options to be able to access the jenkins server.
Get information about a job.
job_nameString
Get a list of all the jobs on this Jenkins server.
Get information about a build.
job_nameStringbuild_numberNumber
Get information about the last build.
job_nameString
Get build output for a build.
job_nameStringbuild_numberNumber
Trigger a build for a job.
job_nameString
Request to stop a build for a job.
job_nameStringbuild_numberNumber
Get current build queue.
- 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.
Thanks to Robin Murphy for basic structure of module.