Security News
NVD Backlog Tops 20,000 CVEs Awaiting Analysis as NIST Prepares System Updates
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
screwdriver-executor-base
Advanced tools
Base class defining the interface for executor implementations
Base class defining the interface for executor implementations
An executor is an engine that is capable of running a set of docker containers together.
i.e. Jenkins, Kubernetes, ECS, Mesos
The intention of an executor is to run the launch
script defined in the screwdriver job-tools docker container, which is mounted to a container defined by a screwdriver task
This means:
launch
script as the entry point to the task container$MOUNT_POINT/launch ${git_org} ${git_repo} ${git_branch} ${job_name}
npm install screwdriver-executor-base
Parameter | Type | Description |
---|---|---|
config | Object | Configuration Object |
config.buildId | String | The unique ID for a build |
config.jobId | String | The unique ID for a job |
config.pipelineId | String | The unique ID for a pipeline |
config.container | String | Container for the build to run in |
config.scmUrl | String | The scmUrl to checkout |
callback | Function | Callback for when task has been created |
The start function is expected to create a task in the execution engine.
callback(err)
callback(null)
Parameter | Type | Description |
---|---|---|
config | Object | Configuration Object |
config.buildId | String | The unique ID for a build |
callback | Function | Callback for when stream has been created |
The stream function is expected to return a readable stream upon success
callback(err)
callback(null, stream)
To make use of the validation function for start, stop and stream, you need to
override the _start
, _stop
, _stream
methods.
class MyExecutor extends Executor {
// Implement the interface
_start(config, callback) {
if (config.buildId) {
// do stuff here...
return callback(null);
}
return process.nextTick(() => {
callback(new Error('Error starting executor'));
});
}
}
const executor = new MyExecutor({});
executor.start({
buildId: '4b8d9b530d2e5e297b4f470d5b0a6e1310d29c5e',
jobId: '50dc14f719cdc2c9cb1fb0e49dd2acc4cf6189a0',
pipelineId: 'ccc49349d3cffbd12ea9e3d41521480b4aa5de5f',
container: 'node:4',
scmUrl: 'git@github.com:screwdriver-cd/data-model.git#master'
}, (err) => {
// do something...
});
npm test
Code licensed under the BSD 3-Clause license. See LICENSE file for terms.
FAQs
Base class defining the interface for executor implementations
The npm package screwdriver-executor-base receives a total of 26 weekly downloads. As such, screwdriver-executor-base popularity was classified as not popular.
We found that screwdriver-executor-base demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.