Drone CI / CD plugin to trigger builds for a list of downstream repositories
6.4K
Drone CI / CD plugin to trigger builds for a list of downstream repositories.
This project uses the Build Create method of the Drone API to trigger builds with specified parameters for the listed repositories, partially replicating the functionality of drone-plugins/drone-downstream but with several improvements:
KEY=VALUE1,VALUE2,VALUE3).linux/amd64, linux/arm64).kind: pipeline
name: default
steps:
- name: trigger
image: yusoltsev/drone-trigger-build
settings:
server: https://drone.example.com
token:
from_secret: drone_token
repositories:
- octocat/Hello-World
- octocat/Spoon-Knife
params:
- KEY=VALUE
- FOO=BAR
$ docker run --rm \
-e PLUGIN_SERVER=https://drone.example.com \
-e PLUGIN_TOKEN=<drone_token> \
-e PLUGIN_REPOSITORIES=octocat/Hello-World,octocat/Spoon-Knife \
-e PLUGIN_PARAMS=KEY=VALUE,FOO=BAR \
-v $(pwd):$(pwd) \
-w $(pwd) \
yusoltsev/drone-trigger-build
Drone passes each settings key to the plugin as a PLUGIN_* environment variable. All four are required; the plugin exits with an error when one is missing or empty.
| Setting | Variable | Description |
|---|---|---|
server | PLUGIN_SERVER | Drone server URL |
token | PLUGIN_TOKEN | Drone access token |
repositories | PLUGIN_REPOSITORIES | Comma-separated owner/name slugs; invalid entries are skipped, at least one must remain |
params | PLUGIN_PARAMS | Comma-separated KEY=VALUE pairs; a part without = extends the previous value |
A failed build request for one repository is logged and does not stop the others or change the exit code.
This application is delivered as a multi-platform Docker image and is available for download from two image registries of choice: yusoltsev/drone-trigger-build and ghcr.io/yegor-usoltsev/drone-trigger-build.
This project uses Semantic Versioning
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.
Content type
Image
Digest
sha256:2f587ffa3…
Size
6.9 MB
Last updated
21 days ago
docker pull yusoltsev/drone-trigger-build