I have a main repository witch have multiple submodules, and one pipeline in it.
the goal is to run the pipeline in the main repository when ever there is a change in the submodules, with the submodules name maybe as a parameter.
is there a way to do that in bitbucket?
thank you!
Hi @Demba Diack and welcome to the community!
In case you have a pipeline running e.g. on master branch of the main repo, if you push the submodule update to master branch of the main repo, then the pipeline will get triggered.
It is also possible to configure a webhook in a submodule repo that runs on every push to the submodule, sends a request to your server, and you can then trigger the pipeline in the main repo with an API call:
Another thing you could do is have another pipeline in each submodule (e.g. the default pipeline that runs on every push to a submodule) and have that pipeline trigger the pipeline of the main repo using the following pipe:
Please keep in mind though that if you don't push the submodule update to the main repo, the main repo will point to an earlier commit of the submodule.
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.