Is there a way to mass edit gitlabci.yml files across repos?

I have about 60 repositories in one project group.

I’d like to be able to add jobs to all these repos, in a single edit / push / api call. Is there such a thing built into gitlab?

use case:
I want to add code climate job to all repositories, without having to edit each gitlab-ci.yml one by one.

ping @gitlab

Unfortunately, I don’t think this feature is available.

The option I am about to recommend will still require a change to all of your pipelines in all of your projects.

I recommend looking into the include section of .gitlab-ci.yml.

See documentation here

If you have some common tasks that you want in all of your projects, you could create another repository that holds template gitlab-ci files which you could then include into all of your pipelines.

In the future, if you want to add more common tasks, you should be able to edit your included template and your projects should be able to pick it up.

3 Likes

I don’t think that’s possible. And as most GitLab instances probably hosts projects of different kinds and in multiple languages, it probably wouldn’t be usable in more than very few cases, so I don’t think it’s abut to be added.

Using an include like @tmos22 suggests sounds like a good solution, and by not including it in projects where it doesn’t make sense, it also provides a good way around my concern.