srbartlett / dependent-pipeline-example

An example of how to have Buildkite pipelines trigger other pipelines

Home Page:https://github.com/buildkite/sample-pipelines

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Buildkite Dependent Pipeline Example

Add to Buildkite

This repository is an example Buildkite pipeline that shows how to trigger another build pipeline from within a pipeline using the Create Build API.

There are two example steps:

  • non_blocking.sh - this creates anoter build and returns a success
  • blocking.sh - this creates a build and waits for it to finish. The step will pass only if the other build passes.

Screenshot

Screenshot of a dependent pipeline build

Environment variables

These steps require the following environment variables to be set:

  • TRIGGER_API_ACCESS_TOKEN - a Buildkite API access token with write_builds and read_builds access
  • TRIGGER_ORG_SLUG - the slug of the org
  • TRIGGER_PIPELINE_SLUG - the slug of the pipeline
  • TRIGGER_COMMIT - the commit for the build (e.g. HEAD)
  • TRIGGER_BRANCH - the branch for the build (e.g. master)
  • TRIGGER_MESSAGE - the message for the build (e.g. Oh hai :wave:)

License

See Licence.md (MIT)

About

An example of how to have Buildkite pipelines trigger other pipelines

https://github.com/buildkite/sample-pipelines

License:MIT License


Languages

Language:Shell 100.0%