Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 33 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,20 +123,49 @@ Limitations:

## List of settings

TODO: complete me!

### `nomadJobTemplate`

* `name`: a prefix to start the Nomad job name with. It will automatically be
completed by a random hash to prevent job name collision.
* `label`: the Jenkins node label to associate the new worker to
* `taskGroups`: a list of `taskTemplate`
* `region`
* `datacenters`
* `envVars`
* `instanceCap`
* `idleMinutes`
* `slaveConnectTimeout`
* `nodeUsageMode`
* `workingDir`

### `taskTemplate`

* `name`: the name of the task run by Nomad. This has to be set to `jnlp` for
now.
* `image`: the [Docker image to run with Nomad](https://www.nomadproject.io/docs/drivers/docker.html#image)
* `resourcesMemory`: the [amount of memory to reserve for the job](https://www.nomadproject.io/docs/job-specification/resources.html#memory-1)
* `resourcesCPU`: the [amount of CPU to reserve for the
job](https://www.nomadproject.io/docs/job-specification/resources.html#cpu)
* `envVars`: a [list of environment variables to export into the task run by
Nomad](https://www.nomadproject.io/docs/job-specification/env.html).
This is a list of `envVar` objects.
* `downloadAgentJar`: default to `false`. If set, download the slave agent from
the Jenkins master at `/jnlpJars/slave.jar` into `/local/slave.jar`, prior to
start the Nomad job.
the Jenkins master at `http://JENKINS_MASTER/jnlpJars/slave.jar` into
`/local/slave.jar`, prior to start the Nomad job.

You can then start the worker using the following command:
```
java -jar /local/slave.jar -jnlpUrl $JENKINS_JNLP_URL -secret $JENKINS_SECRET'
```
* `workingDir`
* `command`
* `args`


### `envVar`

* `key`: the name of the environment variable to export into the Nomad job
* `value`: the value of the environment variable. This needs to be a string.


## Migrating from [Nomad Plugin](https://wiki.jenkins.io/display/JENKINS/Nomad+Plugin)
Expand Down