drone-trigger-build

command module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2023 License: MIT Imports: 6 Imported by: 0

README

drone-trigger-build

Build Status GitHub Release Docker Image (docker.io) Docker Image (ghcr.io)

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:

  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
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
$ 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

Docker Images

The plugin 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. Images are tagged as follows:

  • latest - Tracks the latest released version, which is typically tagged with a version number. This tag is recommended for most users as it provides the most stable version.
  • edge - Tracks the latest commits to the main branch.
  • vX.Y.Z (e.g., v1.0.1) - Represents a specific released version.

Versioning

This project uses Semantic Versioning

Contributing

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.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL