https://github.com/screwdriver-cd/executor-jenkins
Jenkins Executor for Screwdriver
https://github.com/screwdriver-cd/executor-jenkins
Last synced: 11 months ago
JSON representation
Jenkins Executor for Screwdriver
- Host: GitHub
- URL: https://github.com/screwdriver-cd/executor-jenkins
- Owner: screwdriver-cd
- License: other
- Created: 2016-07-26T00:32:38.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-03-28T17:46:10.000Z (about 3 years ago)
- Last Synced: 2024-04-23T22:19:39.267Z (about 2 years ago)
- Language: JavaScript
- Size: 102 KB
- Stars: 3
- Watchers: 19
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Screwdriver Jenkins Executor
[![Version][npm-image]][npm-url] ![Downloads][downloads-image] [![Build Status][status-image]][status-url] [![Open Issues][issues-image]][issues-url] ![License][license-image]
> Jenkins Executor Plugin for Screwdriver
## Usage
```bash
npm install screwdriver-executor-jenkins
```
### Configure
The class provides a couple options that are configurable in the instantiation of this Executor
| Parameter | Type | Default | Description |
| :------------- | :---- | :----------| :-----------|
| config | Object | | Configuration Object |
| config.ecosystem | Object | | Screwdriver Ecosystem (ui, api, store, etc.) |
| config.jenkins.username | String | 'screwdriver' | The username for the Jenkins cluster |
| config.jenkins.password | String | | The password or token for the Jenkins cluster |
| config.jenkins.host | String | | The hostname for the Jenkins cluster |
| config.jenkins.port | Number | 8080 | The port number for the Jenkins cluster |
| config.jenkins.nodeLabel | String | 'screwdriver' | Node labels of Jenkins slaves |
| config.jenkins.buildTimeout | Number | 90 | Number of minutes to allow a build to run before considering it is timed out |
| config.jenkins.maxBuildTimeout | Number | 120 | Max timeout user can configure up to |
| config.docker.composeCommand | String | 'docker'-compose | The path to the docker-compose command |
| config.docker.launchVersion | String | 'stable' | Launcher container version to use |
| config.docker.prefix | String | '' | Prefix to container names |
| config.docker.memory | String | '4g' | Memory limit (docker run `--memory` option) |
| config.docker.memoryLimit | String | '6g' | Memory limit include swap (docker run `--memory-swap` option) |
| config.buildScript | String | | Shell script to start the job |
| config.cleanupScript | String | '' | Shell script to clean up the job |
| config.cleanupTimeLimit | Number | 20 | Time to stop the job (seconds) |
| config.cleanupWatchInterval | Number | 2 | Interval to detect the stopped job (seconds) |
If `config.buildScript` is provided, the executor run the command instead of docker. You are responsible for deploying launcher in slave machines or VM.
### Requirements
#### Jenkins
- [Post build task plugin](https://wiki.jenkins.io/display/JENKINS/Post+build+task)
#### Slave machine
- [Docker](https://www.docker.com/)
- [Docker Compose](https://docs.docker.com/compose/)
### Methods
For more information on `start`, `stop`, and `stats` please see the [executor-base-class].
## Testing
```bash
npm test
```
## License
Code licensed under the BSD 3-Clause license. See LICENSE file for terms.
[npm-image]: https://img.shields.io/npm/v/screwdriver-executor-jenkins.svg
[npm-url]: https://npmjs.org/package/screwdriver-executor-jenkins
[downloads-image]: https://img.shields.io/npm/dt/screwdriver-executor-jenkins.svg
[license-image]: https://img.shields.io/npm/l/screwdriver-executor-jenkins.svg
[issues-image]: https://img.shields.io/github/issues/screwdriver-cd/screwdriver.svg
[issues-url]: https://github.com/screwdriver-cd/screwdriver/issues
[status-image]: https://cd.screwdriver.cd/pipelines/19/badge
[status-url]: https://cd.screwdriver.cd/pipelines/19
[executor-base-class]: https://github.com/screwdriver-cd/executor-base
[screwdriver job-tools]: https://github.com/screwdriver-cd/job-tools