Code Monkey home page Code Monkey logo

strider-paperg-runner's Introduction

Runner extension for Strider.

Spec

require('strider-simple-runner').create(emitter, config, done)

Config

All options are optional.

pty(false):              use 'pty' for running commands. Currently disabled
logger(console):         .log, .warn, .error
io(new EventEmitter):    the channel of internal communication with the job worker
processJob(core.process):function to run a job. (task, config, ondone)
pluginDirs:              the directories in which to look for plugins
dataDir($HOME/.strider): the directory in which to clone/test/etc

Events

Expected to consume

  • 'job.new'
{
  id: Oid,
  type: 'TEST_ONLY' | 'TEST_AND_DEPLOY',
  user_id: Oid,
  trigger: {
  },
  ref: {
    branch: String,
    id: String // commit id
  },
  // this stuff is not part of the "job" document in mongo, but is added
  project: {
    // project config straight from db, includes plugin config and
    // project level provider config
  },
  userProvider: { // user-level config for the provider. Things like a github
  }               // OAuth token. Retrieved from user.providers.[providerid]
}

Ex: github provider config

{
  id: 'github',
  user: {
    token: '1234',
    username: 'hacker'
  },
  project: {
    url: 'example.com/repo.git',
    display_url: 'http://example.com/repo',
    auth: {
      method: 'https',
      username: null, // use user's gh auth
      password: null // use user's gh token
    }
  }
}

Ex: git provider config

{
  id: 'git',
  user: {},
  project: {
    url: 'example.com/repo.git',
    method: 'ssh',
    privkey: null, // use repo-level ssh keys
    pubkey: null
  }
}

Project config looks like:

{
  name: 'owner/name',
  public: false,
  active: true,
  deploy_on_green: true,
  secret: // what's this for?
  runner: {
    id: 'simple', // or docker, etc.
    pty: false
    // other config for the runner
  },
  privkey: '',
  pubkey: '',
  provider: {}, // provider config
  // owner is implicit, as it's embedded ...
  collaborators: [],
  plugins: [{
    id: 'heroku',
    // plugin config
  }, ...]
}

Plugins needed:

  • heroku
  • webhooks

Providers:

  • git
  • github

Tests

Strider-simple-runner comes with tests. To run, simply execute npm test.

License

Strider-simple-runner is released under a BSD license.

Credits

Picture of worker ant CC-BY myprofe from http://www.flickr.com/photos/myprofe/5883651745/sizes/m/in/photostream/

strider-paperg-runner's People

Contributors

jaredly avatar peterbraden avatar d3ming avatar vasili-zolotov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.