Trigger CI build if any dependent git repo is updated

I have 4 git repos

alpha
bravo
charlie
zulu

alpha, bravo and charlie are all source code with dependencies, and zulu is a cookbook to compile and package them all

How can I trigger a build step on zulu if any one of alpha, bravo, or charlie have a commit to master?

I’m thinking I could have a build step in zulu that is configured to only run with an ‘external’ trigger, and alpha bravo charlie could all have build steps to call a webhook.

I can’t find any documentation on how the ‘external’ trigger works.
Is this a feasible option?
Any suggestions on how I could implement this?

I figured it out using triggers

in zulu pipelin create a trigger.
In the gitlab-ci.yaml of zulu add a build step and limit it to only execute on triggers.

compile:
  stage: compile
  script:
    - compile stuff and upload to artifact repository
  only:
    - triggers

Then in alpha, bravo, and charlie call the trigger

compile:
  stage: build
  script:
    - "curl -X POST -F token=xxxxxxxxxx -F ref=master https://gitlab.example.com/api/v4/projects/99999/trigger/pipeline"
  only:
    - master
3 Likes