Skip to content

jcrugzz/ciper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ciper

Easily instantiate a PR and a master branch test workflow with jenkins and github.

install

npm i ciper --save

example

Use ciper to poll the github API for various organizations to sync projects of those organizations with jenkins in order for Test PR and master branch webhooks to work seamlessly

var Ciper = require('ciper');

var ciper = new Ciper({
  organizations: ['nodejitsu', 'warehouseai', 'godaddy']
  ghTemplateUrl: 'https://github.com',
  github: {
    url: 'https://api.github.com'
  },
  jenkins: 'http://myjenkinsurl',
  credentialsId: 'uuid', // pretend this is a UUID
  gitHubAuthId: '' // TODO: figure out what this is used for with the github plugin,
  type: 'master' // Allowed values: ['master', 'pr']
});

//
// Will poll the github API every hour and attempt to sync all of the
// repositories
//
ciper.poll(3E6)
  .on('error', function (err) {
    // something bad happened, log it
    console.error(err);
  })
  .on('poll:start', function () {
    console.log('Github poll started');
  })
  .on('poll:finish', function () {
    console.log('Github poll finished, repos synced');
  })

license

MIT

About

Easily instantiate a PR test workflow with jenkins and github

Resources

License

Stars

Watchers

Forks

Packages

No packages published