Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger Pipeline when commiting to a submodule

Simon September 13, 2019

Hi Community,

i do have a Bitbucket Repo (Repo A) containing several Submodules (Repo B & Repo C)

Is it possible, that the Pipeline of Repo A will be triggered, when a Commit to Repo B or Repo C was done?

 

Best regards
Simon

1 answer

1 accepted

0 votes
Answer accepted
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 17, 2019

Hi @Simon

I suppose your Repo A (main repository) will be triggered every time you update the links to commits present in your git submodules. In theory, every time you want those commits to be considered in the main repo you should update the links.

Usually, we use submodules when we have an independent part of the software (self-contained) that does not need to have the link updated every time in the main repository.

If you are not updating the main repository because you need to make sure the sub repo changes are tested first, you may want to create another branch in the main repository where you can update the links every time and test before merging the changes to the master branch (or whatever you call the default branch).

If you don't want to change your workflow to get the main repository triggered, you may want a different approach (like a workaround) which is creating a custom pipeline step and using a REST API to call this step from your sub repos when new commits arrive.

These are the references you can use:

I hope it helps.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events