Trigger pipeline when another pipeline completes

I want to configure a pipeline to trigger when an upstream pipeline completes.

Use case:
Project/pipeline 1: Packer build for base ami
Project/pipeline 2: Packer build that uses the base ami and installs more software

When the base image updates I want to build the dependent packer build to update to the newest things installed in the base image.

I want this to work like docker hub linked repositories:

1 Like

I’m not sure that you can add some listener. But you can at least make the upstream pipeline trigger a downstream project. Might not be fully what you want.

https://docs.gitlab.com/ee/ci/triggers/README.html#ci-job-token

1 Like

Is this feature available as yet? Kinda difficult to ask a bigger upstream project to trigger your’s. Need a way where yours can start when upstream latest pipeline produces its artifacts.

You could create a separate pipeline to check the upstream for updates and have that trigger the main pipeline–basically a CI cron job.

Not the most elegant solution but probably the best option at this point.

1 Like