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.
These steps require the following environment variables to be set:
TRIGGER_API_ACCESS_TOKEN
- a Buildkite API access token withwrite_builds
andread_builds
accessTRIGGER_ORG_SLUG
- the slug of the orgTRIGGER_PIPELINE_SLUG
- the slug of the pipelineTRIGGER_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:
)
See Licence.md (MIT)