Skip to content

sueddeutsche/jenkins-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-jenkins

Node client for the Jenkins API

Installation

npm install --save hjerling/node-jenkins

Usage

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);
});

API

new Jenkins(jenkins_base_url, options)

Create a new Jenkins client.

Options
  • Request options to be able to access the jenkins server.

Job

.jobInfo

Get information about a job.

Parameters
  • job_name String

.jobList

Get a list of all the jobs on this Jenkins server.

Build

.buildInfo

Get information about a build.

Parameters
  • job_name String
  • build_number Number

.lastBuildInfo

Get information about the last build.

Parameters
  • job_name String

.buildOutput

Get build output for a build.

Parameters
  • job_name String
  • build_number Number

.build

Trigger a build for a job.

Parameters
  • job_name String

.stopBuild

Request to stop a build for a job.

Parameters
  • job_name String
  • build_number Number

.queue

Get current build queue.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Create new Pull Request.

Thanks

Thanks to Robin Murphy for basic structure of module.

About

An API for the Jenkins CI build server

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%