screwdriver-executor-router
Advanced tools
Comparing version 0.1.2 to 0.1.3
20
index.js
@@ -61,3 +61,3 @@ 'use strict'; | ||
* Starts a new build in an executor | ||
* @method start | ||
* @method _start | ||
* @param {Object} config Configuration | ||
@@ -71,3 +71,3 @@ * @param {Object} [config.annotations] Optional key/value object | ||
*/ | ||
start(config) { | ||
_start(config) { | ||
const annotations = config.annotations || {}; | ||
@@ -79,4 +79,20 @@ const executorType = annotations[ANNOTATION_EXECUTOR_TYPE]; | ||
} | ||
/** | ||
* Stop a running or finished build | ||
* @method _stop | ||
* @param {Object} config Configuration | ||
* @param {Object} [config.annotations] Optional key/value object | ||
* @param {String} config.buildId Unique ID for a build | ||
* @return {Promise} | ||
*/ | ||
_stop(config) { | ||
const annotations = config.annotations || {}; | ||
const executorType = annotations[ANNOTATION_EXECUTOR_TYPE]; | ||
const executor = this[executorType] || this.defaultExecutor; // Route to executor (based on annotations) or use default executor | ||
return executor.stop(config); | ||
} | ||
} | ||
module.exports = ExecutorRouter; |
{ | ||
"name": "screwdriver-executor-router", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "A generic plugin for routing builds to specified executors", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8328
79