At the moment we put a .gitlab-ci.yml in every project. At the moment we have more than 50 projects and every time something changes to the .gitlab-ci.yml the team has to change the structure in all of the projects. Is it possible to have one common .gitlab-ci.yml?
Attempts
- Tried to have one gitlab-ci.yml, but do not know how to change the default path to this file
- common scripts decrease the amount of code duplication, but if the gitlab-ci.yml structure changes we have to implement it in all the projects
Best Answer
No this is not possible. It goes against the idea of why this method exists, because what if you add a git repo/project that needs a completely different yml file?
What you could do (as you mentioned) is have a script you run, which is downloaded during the
.gitlab-ci.yml
run process. Something like this:Set this as the script for every project, and then all you need to do is update the run_suite.sh once and all new projects will use it.
I don't think there's any better way than that, I'm afraid.