Multiple pipelines for BuildkiteSeptember 9, 2022 — 2 min read
This week I have been learning Buildkite at work @twilio. I never used this software and I am not special attracted to configuring CIs. It's hard for me to learn CI since every company has one and once you have configured your pipeline or job you will eventually forget about it.
The problem I had to deal is to migrate pipelines from Jenkins to Buildkite.
Buildkite will have a default step which is to upload the pipeline and execute it. This pipeline usually lives under
.buildkite/pipeline.yaml but what happens when we want to have multiple pipelines for each kind of event? like one pipeline for pull request another for release and one for end-to-end tests?
Lead by ignorance I thought those pipelines could have a naming convention so I tried every possible name without luck. Finally, I understood the key fact for this CI.
You have to create multiple jobs and for every job and you can edit the default step and upload your custom pipeline.
Like the example below 👇
steps: - label: ':pipeline:' command: 'buildkite-agent pipeline upload .buildkite/pipeline.pr-validator.yaml'
You could have something like:
- /.buildkite - pipeline.release.yaml # <-- Release deployments - pipeline.pr-validation.yaml # <-- pull request validation - pipeline.e2e.yaml # <-- e2e pipeline