Socket
Book a DemoInstallSign in
Socket

screwdriver-executor-j5s

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

screwdriver-executor-j5s

Jenkins Executor plugin for Screwdriver

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
2
Created
Source

Screwdriver Jenkins Executor

Version Downloads Build Status Open Issues Dependency Status License

This executor plugin extends the executor-base-class, and provides methods to start jobs from Jenkins

Usage

npm install screwdriver-executor-j5s

Configure

The class provides a couple options that are configurable in the instantiation of this Executor

ParameterTypeDescription
configObjectConfiguration Object
config.usernameStringThe username for Jenkins cluster
config.passwordStringThe password or token for Jenkins cluster
config.hostStringThe hostname for the Jenkins cluster

Start

The start method takes advantage of the input validation defined in the executor-base-class.

The parameters required are:

ParameterTypeDescription
configObjectConfiguration Object
config.buildIdStringThe unique ID for a build
config.containerStringContainer for the build to run in
config.apiUriStringScrewdriver's API
config.tokenStringJWT to act on behalf of the build
callbackFunctionCallback fn(err) for when job has been created

The start function will start a job in Jenkins with labels for easy lookup. These labels are:

  • sdbuild: config.buildId

The job runs two containers:

  • Runs the screwdriver job-tools container, sharing the files in /opt/screwdriver
  • Runs the specified container, which runs /opt/screwdriver/launch with the required parameters

The callback is called with:

  • An error callback(err) when an error occurs starting the job
  • null callback(null) when a job is correctly started

Stop

The parameters required are:

ParameterTypeDescription
configObjectConfiguration Object
config.buildIdStringThe unique ID for a build to be stopped
callbackFunctionCallback fn(err) for when the build has been stopped

The stop function will stop last build of the job with the buildId tag in jenkins.

The callback is called with:

  • An error callback(err) when an error occurs stopping the job
  • null callback(null) when a job is correctly stopped

Testing

npm test

License

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

Keywords

screwdriver

FAQs

Package last updated on 24 Oct 2016

Did you know?

Socket

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.

Install

Related posts