项目作者: screwdriver-cd

项目描述 :
Create executor queue worker(s)
高级语言: JavaScript
项目地址: git://github.com/screwdriver-cd/queue-worker.git
创建时间: 2017-08-03T23:14:02Z
项目社区:https://github.com/screwdriver-cd/queue-worker

开源协议:Other

下载


Screwdriver Queue Worker

Version Downloads Build Status Open Issues Dependency Status License

Creates executor queue worker(s)

A Resque Worker implementation that consumes jobs in a Resque queue.

Usage

  1. npm install screwdriver-queue-worker

Configuration

Queue worker already defaults most configuration, but you can override defaults using a local.yaml or environment variables using custom-environment-variables.yaml.

Methods

Start

Required Parameters
Parameter Type Description
config Object Configuration Object
config.annotations Object Optional key-value object
config.apiUri String Screwdriver’s API
config.buildId String The unique ID for a build
config.container String Container for the build to run in
config.token String JWT to act on behalf of the build
config.jobId String Job that this build belongs to
config.blockedBy String Jobs that are blocking this job
Expected Outcome

The start function is expected to create a build in the designated execution engine.

Expected Return

A callback of fn(err, result), where err is an Error that was encountered (if any) and result
is the data that the execution engine returns.

Stop

Required Parameters
Parameter Type Description
config Object Configuration Object
config.annotations Object Optional key-value object
config.buildId String The unique ID for a build
config.jobId String Job that this build belongs to
config.blockedBy String Jobs that are blocking this job
Expected Outcome

The stop function is expected to stop/cleanup a task in the desginated execution engine.

Expected Return

A callback of fn(err, result), where err is an Error that was encountered (if any) and result
is the data that the execution engine returns.

Testing

  1. npm test

License

Code licensed under the BSD 3-Clause license. See LICENSE file for terms.