Skip to content

create-branches: Suspend CI when creating branches

Emanuele Aina requested to merge wip/em/suspend-ci-on-git-branching into main

When naively creating new branches, a CI/CD pipeline is created for each of them. This means thousands of pipelines created in a couple of minutes, which end up clogging the runners system with jobs that in most cases will either fail since dependencies are not there yet (for instance, image builds will lack the docker images) or won't be useful anyway (for instance, package uploads would be a no-op since OBS is branched separatedly).

To avoid this, temporarily disable the CI/CD on the project before creating the new branch, and re-enable it immediately afterwards.

This Python reimplementation of the script uses a thread pool to process all the projects a lot faster, using the same approach as the one from infrastructure/gitlab-rulez> and infrastructure/dashboard>.

The script should also be idempotent, interrupting and re-running it should make it proceed from where it left.

Merge request reports

Loading