Skip to content

buildkite/dynamic-pipeline-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Buildkite Dynamic Pipeline Steps Example

Add to Buildkite

This repository is an example Buildkite pipeline that shows how to programmatically generate a build pipeline, allowing you to customize and distribute your build jobs however you wish.

How does it work?

When a build is start it runs a single job first. This job executes .buildkite/pipeline.sh | buildkite-agent pipeline upload.

This .buildkite/pipeline.sh script does the following:

  • Creates a separate test step for each directory in specs
  • Adds a deploy step at the end only if the build is on the master branch

For a non-master branch build it generates:

steps:
  - command: "specs/controllers/test.sh"
    label: "controllers"
  - command: "specs/features/test.sh"
    label: "features"
  - command: "specs/models/test.sh"
    label: "models"

For a master branch build it generates:

steps:
  - command: "specs/controllers/test.sh"
    label: "controllers"
  - command: "specs/features/test.sh"
    label: "features"
  - command: "specs/models/test.sh"
    label: "models"
  - wait
  - command: "echo Deploy!"
    label: ":rocket:"

What else could you do? The possibilities are endless. For example Jobsworth is a high-level tool that uses this to create deployments, rollbacks, QA steps, etc.

License

See Licence.md (MIT)

About

An example of how to generate dynamic build pipelines in Buildkite

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages