How can I trigger a build from a specific folder only in a monorepo? (buildkite)

874 Views Asked by At

We have a monorepo with 3 systems inside it. I want to create a separate build for each of the systems.

How can I trigger a pipeline only when files change in a specific folder?

We are using github

steps:

  - label: 'Lint'
    command: '.buildkite/scripts/lint.sh'
    agents:
      node: true
      queue: xyz

  - label: 'Run Tests'
    command: '.buildkite/scripts/tests.sh'
    agents:
      node: true
      queue: xyz

1

There are 1 best solutions below

0
Eloise On

buildkite support emailed me this solution:

Thanks for reaching out! It sounds like you may want to take a look at using the monorepo diff plugin!

https://github.com/chronotc/monorepo-diff-buildkite-plugin

There is a good medium article here as well on setting it up: https://medium.com/geekculture/set-up-continuous-integration-for-monorepo-using-buildkite-61539bb0ed76

Let us know if you have any other questions or need more assistance!

Cheers,