We have 2 repo one for the source code and other for the tests. Currently these both have separate buildkite pipelines. I would like to trigger the tests pipeline first after a commit to source code repo then followed by the source code pipeline. Could you please let me know if this is possible and if so how to achieve this?
This is certainly possible. If you trigger the tests pipeline directly from GitHub or your SCM, you can then add a trigger step to that pipeline which will start a build on the source code pipeline when you are ready. Ie you could configure it to only run source code if all steps in tests pass.
Docs on the trigger step can be found at Trigger step | Buildkite Documentation
Hey @paula, could you please let me know where can I find the correct URL that is required for the trigger step as I got “Pipeline does not exist” error when I tried.
Hmm its a little hard without a concrete example of your failure. Are you saying you specified the pipeline URL in the yaml attributes? You only need to give it the pipeline name and it needs to be in the same organisation/cluster as the original pipeline.
Eg.
steps:
# this is correct
- trigger: source-code
# this is not
- trigger: https://buildkite.com/buildkite-organization/source-code
I would like to continue only when the tests-pipeline pass, how could I do it, though I used asyn: false, after triggering the tests-pipeline, it continued with the source-code pipeline.