Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jenkins-api-findly

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jenkins-api-findly

Jenkins API written in Node.js customized from original node-jenkins-api module

  • 0.2.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

nodejs-jenkins-api

Install

npm install jenkins-api

Usage

setup

var jenkinsapi = require('jenkins-api');

var jenkins = jenkinsapi.init("http://jenkins.yoursite.com");
// or with auth
var jenkins = jenkinsapi.init("http://username:password@jenkins.yoursite.com");

all jobs

jenkins.all_jobs(function(err, data) {
  if (err){ return console.log(err); }
  console.log(data)
});

job info

jenkins.job_info('job-in-jenkins', function(err, data) {
  if (err){ return console.log(err); }
  console.log(data)
});

enable job

jenkins.enable_job('job-in-jenkins', function(err, data) {
  if (err){ return console.log(err); }
  console.log(data)
});

disable job

jenkins.disable_job('job-in-jenkins', function(err, data) {
  if (err){ return console.log(err); }
  console.log(data)
});

build

jenkins.build('job-in-jenkins', function(err, data) {
  if (err){ return console.log(err); }
  console.log(data)
});

build with params

jenkins.build('job-in-jenkins', {key: 'value'}, function(err, data) {
  if (err){ return console.log(err); }
  console.log(data)
});

build info

jenkins.build_info('job-in-jenkins', 'build-number', function(err, data) {
  if (err){ return console.log(err); }
  console.log(data)
});

last build info

jenkins.last_build_info('job-in-jenkins', function(err, data) {
  if (err){ return console.log(err); }
  console.log(data)
});

last build report

jenkins.last_build_report('job-in-jenkins', function(err, data) {
  if (err){ return console.log(err); }
  console.log(data)
});

get config xml

jenkins.get_config_xml('job-in-jenkins', function(err, data) {
  if (err){ return console.log(err); }
  console.log(data)
});

copy job

jenkins.copy_job('job-to-copy'
                ,'new-job-title'
                ,function(config) {
                    // function which takes the config.xml, and returns
                    // the new config xml for the new job
                    return config.replace('development','feature-branch');
                }
                ,function(error, data) {
                      // if no error, job was copied
                      if (err){ return console.log(err); }
                      console.log(data)
                });

delete job

jenkins.delete_job('job-in-jenkins', function(err, data) {
  if (err){ return console.log(err); }
  console.log(data)
});

last success

jenkins.last_success('job-in-jenkins', function(err, data) {
  if (err){ return console.log(err); }
  console.log(data)
});

last result

jenkins.last_result('job-in-jenkins', function(err, data) {
  if (err){ return console.log(err); }
  console.log(data)
});

job output

jenkins.job_output('job-in-jenkins', 'buildname', function(err, data) {
  if (err){ return console.log(err); }
  console.log(data)
});

get all queued items

jenkins.queue(function(err, data) {
  if (err){ return console.log(err); }
  console.log(data)
});

get all jenkins computers (aka workers)

jenkins.computers(function(err, data) {
  if (err){ return console.log(err); }
  console.log(data)
});

Notes

Modeled after the Python Jenkins API

Keywords

FAQs

Package last updated on 13 Oct 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc