https://github.com/yegor-usoltsev/drone-trigger-build
Drone CI / CD plugin to trigger builds for a list of downstream repositories
https://github.com/yegor-usoltsev/drone-trigger-build
build-automation ci devops drone drone-ci drone-plugin
Last synced: 8 months ago
JSON representation
Drone CI / CD plugin to trigger builds for a list of downstream repositories
- Host: GitHub
- URL: https://github.com/yegor-usoltsev/drone-trigger-build
- Owner: yegor-usoltsev
- License: mit
- Created: 2023-05-27T00:29:55.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-16T08:38:22.000Z (over 1 year ago)
- Last Synced: 2025-03-16T09:25:19.290Z (over 1 year ago)
- Topics: build-automation, ci, devops, drone, drone-ci, drone-plugin
- Language: Go
- Homepage:
- Size: 55.7 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# drone-trigger-build
[](https://github.com/yegor-usoltsev/drone-trigger-build/actions)
[](https://codecov.io/github/yegor-usoltsev/drone-trigger-build)
[](https://github.com/yegor-usoltsev/drone-trigger-build/releases)
[](https://hub.docker.com/r/yusoltsev/drone-trigger-build)
[](https://github.com/yegor-usoltsev/drone-trigger-build/pkgs/container/drone-trigger-build)
[](https://hub.docker.com/r/yusoltsev/drone-trigger-build/tags)
Drone CI / CD plugin to trigger builds for a list of downstream repositories.
This project uses the [Build Create method](https://docs.drone.io/api/builds/build_create/) of the Drone API to
trigger builds with specified parameters for the listed repositories, partially replicating the functionality
of [drone-plugins/drone-downstream](https://github.com/drone-plugins/drone-downstream) but with several improvements:
1. This project creates a new build instead of restarting the previous one.
2. It correctly parses the parameters with commas (e.g. `KEY=VALUE1,VALUE2,VALUE3`).
3. It builds as a multi-platform Docker image (`linux/amd64`, `linux/arm64`).
## Usage
### Drone Pipeline
```yaml
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
```bash
$ docker run --rm \
-e PLUGIN_SERVER=https://drone.example.com \
-e PLUGIN_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
```
## Docker Images
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](https://hub.docker.com/r/yusoltsev/drone-trigger-build)
and [ghcr.io/yegor-usoltsev/drone-trigger-build](https://github.com/yegor-usoltsev/drone-trigger-build/pkgs/container/drone-trigger-build).
## Versioning
This project uses [Semantic Versioning](https://semver.org)
## Contributing
Pull requests are welcome. For major changes,
please [open an issue](https://github.com/yegor-usoltsev/drone-trigger-build/issues/new) first to discuss what you would
like to change. Please make sure to update tests as appropriate.
## License
[MIT](https://github.com/yegor-usoltsev/drone-trigger-build/blob/main/LICENSE)