drone/drone-node

Name: drone-node

Owner: drone.io

Description: Node client for the Drone API

Created: 2015-11-03 01:18:21.0

Updated: 2018-05-11 08:43:40.0

Pushed: 2018-02-16 12:29:32.0

Homepage: null

Size: 16

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

drone-node

Node client for the Drone API

Client

An API client is included in this package

t Drone = require('drone-node');

t client = new Drone.Client({ url: 'https://your.drone.server.com', token: 'SoMeToKeN' });

nt.getRepos().then((repos) => {

 lists all the repos available to the authenticated user

Many methods are available, until they're documented see lib/index.js for details.

Plugins

This package provides utilities for creating plugins. Plugins are command-line programs invoked during the build process. Build information and plugin configuration is passed to the plugin as a command-line argument in JSON format:

 run super_plugin.js -- '{ "build": {"number": 1, "status": "success"} }'

Example usage:

t Drone = require('drone-node');
t plugin = new Drone.Plugin();

in.parse().then((params) => {

 gets build and repository information for
 the current running build
nst build = params.build;
nst repo  = params.repo;

 gets plugin-specific parameters defined in
 the .drone.yml file
nst vargs = params.vargs;


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.