Hi,
I want to use the following pattern, but can't figure a way to do it in bitbucket pipelines.
Repo A (bussiness app A)
Repo B (k8s manifests for business app A, also pipeline definition)
Workflow:
Once there is merge to main branch in Repo A, pipeline from repo B triggers.
This is for concern separation, people developing app A are not necessary the same who are responsible for build pipelines and infra, so there is no need to clutter their repo with pipeline definition and infra elements. I've been sucessfully using this pattern in another ecosystem, how close can I get with bitbucket pipelines?
Hi Aurimas,
One option is to use a pipeline in repo A that will run on the main branch only, and the only thing it will do is trigger a build in repo B. You can use the following pipe in the yml file of repo A, to trigger a build in repo B:
You could also use our API instead:
Another option would be to use a webhook in repo A that gets triggered on repo push events. A webhook can send a request to a server of yours every time the event you have selected in the triggers occurs. After the request is received by your server, you can check the webhook payload to see if the push was made to the main branch and then use our API to trigger the pipeline in repo B.
Please feel free to reach out if you have any questions!
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.