gitlabgitlab-cipipelinecicd

Injecting a gitlab CI/CD pipeline at a group level


Currently, I'm using required pipeline configuration to "inject" a pipeline to all projects in a top-level group and sub-groups. This would allow me to run my pipeline first than run the pipeline at the local project level.

However, required pipeline configuration is deprecated in v15.9 and will be removed in v17.0.

I understand that I can switch to compliance framework/pipeline. But I would need to manually make changes to each and every projects (Have tens of thousands) in the top-level groups and subgroups. And there is a possibility that new projects might be left out.

The schema of the groups looked something like this:

Top-level-Group
|--Subgroup1
|----Project1
|----Project2
|----Sub-Subgroup1
|------Project3
|--Subgroup2
|----Project2

I know there is a question on this previously. But the solution requires me to go to each and every project to include the "general CI/CD configuration file", which is very tedious and the possibility to miss out new projects is high.

I want to be able to run my pipeline (not necessary in gitlab) for all projects in the top-level group and subgroups than continue whatever local pipeline is configured for the projects.

Appreciate if anyone can provide any insights or recommendations. Currently, I have no idea on where/how to start.


Solution

  • I did a workaround for my problem using out-of-band solution.

    Basically, i use a group web hook to trigger a lambda function in aws which in turn will trigger the pipeline that i want to run in gitlab.

    This ensures that i'm still using the same runners as previously.

    Group Webhook -> AWS lambda -> trigger pipeline thru API