How to deploy gitlab-ci.yml for many repository?

:hugs: Please help fill in this template with all the details to help others help you more efficiently. Use formatting blocks for code, config, logs and ensure to remove sensitive data.

Problem to solve

I would like to deploy a common configuration of gitlab-ci.yml to many repos. Also, updating the pipeline as well. Whats the best method to achieve this?

Steps to reproduce

Which troubleshooting steps have you already taken? Can you link to any docs or other resources so we know where you have been?

Configuration

Provide screenshots from the GitLab UI showing relevant configuration, if applicable.
On self-managed instances, add the relevant configuration settings or changes.

Versions

Please select whether options apply, and add the version information.

Versions

Helpful resources

  1. Before opening a new topic, make sure to search for keywords in the forum search
  2. Check the GitLab project for existing issues. If you encounter a bug, please create a bug report issue.
  3. Troubleshooting docs: Self-managed GitLab instances.

Thanks for taking the time to be thorough in your request, it really helps! :blush:

Hi,

Have you considered using include?

It basically allows you to store your CI/CD yaml file(s) in another git repo, and reference it in one or more other git projects - I’ve been doing this myself. The moment you update your yaml file on the main branch, the changes are applied as well in other projects (where the yaml file is referenced).

1 Like

Thank you

1 Like