forked from lix-project/hydra
RunCommand: split out documentation, fixup the matcher syntax
This commit is contained in:
parent
85b842e0ac
commit
4ea646130c
|
@ -7,6 +7,7 @@
|
|||
- [Hydra jobs](./jobs.md)
|
||||
- [Plugins](./plugins/README.md)
|
||||
- [Declarative Projects](./plugins/declarative-projects.md)
|
||||
- [RunCommand](./plugins/RunCommand.md)
|
||||
- [Using the external API](api.md)
|
||||
- [Webhooks](webhooks.md)
|
||||
- [Monitoring Hydra](./monitoring/README.md)
|
||||
|
|
|
@ -192,10 +192,12 @@ Writes InfluxDB events when a builds finished.
|
|||
- `influxdb.url`
|
||||
- `influxdb.db`
|
||||
|
||||
## Run command
|
||||
## RunCommand
|
||||
|
||||
Runs a shell command when the build is finished.
|
||||
|
||||
See [The RunCommand Plugin](./RunCommand.md) for more information.
|
||||
|
||||
### Configuration options:
|
||||
|
||||
- `runcommand.[].job`
|
||||
|
|
32
doc/manual/src/plugins/RunCommand.md
Normal file
32
doc/manual/src/plugins/RunCommand.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
## The RunCommand Plugin
|
||||
|
||||
Hydra supports executing a program after certain builds finish.
|
||||
This behavior is disabled by default.
|
||||
|
||||
Hydra executes these commands under the `hydra-notify` service.
|
||||
|
||||
### Static Commands
|
||||
|
||||
Configure specific commands to execute after the specified matching job finishes.
|
||||
|
||||
#### Configuration
|
||||
|
||||
- `runcommand.[].job`
|
||||
|
||||
A matcher for jobs to match in the format `project:jobset:job`. Defaults to `*:*:*`.
|
||||
|
||||
**Note:** This matcher format is not a regular expression.
|
||||
The `*` is a wildcard for that entire section, partial matches are not supported.
|
||||
|
||||
- `runcommand.[].command`
|
||||
|
||||
Command to run. Can use the `$HYDRA_JSON` environment variable to access information about the build.
|
||||
|
||||
### Example
|
||||
|
||||
```xml
|
||||
<runcommand>
|
||||
job = myProject:*:*
|
||||
command = cat $HYDRA_JSON > /tmp/hydra-output
|
||||
</runcommand>
|
||||
```
|
Loading…
Reference in a new issue