Extend Auto DevOps to allow just the Auto Build feature to be used without all the extras (aka global CI/CD config)
Description
There has been much discussion in the past (see #27984 (moved), #15041 (moved)) about the possibility of having "our of tree" .gitlab-ci.yml or somehow be able to configure CI/CD for a project without relying on having the .gitlab-ci.yml file in the repo.
My use case for this is that only the owner of a project should be able to configure the build process and users shouldn't need to edit (or have access to) this. I am using Gitlab as a backend for a PaaS and the initial project setup and build process is 100% managed by the system using the API.
The only interaction the user has with Gitlab is through git commands. Their only expectation is that when they push code the build runs automatically and they should not even know or care about the inner workings of Gitlab CI.
This is difficult today because .gitlab-ci.yml must exist in the repo and any user with push rights could edit or delete the file, breaking the builds.
Proposal
With the Auto DevOps feature I am glad to see we have a more "hands-off" approach to CI/CD, but for my situation it is just too much functionality baked in. I am not interested in linking Gitlab to a Kubernetes cluster, use the monitoring, review apps and auto-deploy features.
What I am proposing is a simplified way to use only the "Auto Build" feature of Auto DevOps and allow an admin to configure a global "Build script" for the Gitlab instance which will be used if Auto Build is enabled for a project. The Auto Build definition could be just a .gitlab-ci.yml document managed from the admin settings and not tied to any particular project to keep it simple.
This would allow a common build config to be shared between multiple projects, and no extra configuration has to be done to the project in order to take advantage of CI/CD. Our CI/CD pipeline builds Docker images and the actual build script in .gitlab-ci.yml is very simple and more or less the same across different project types.
A new option could be added to the Pipeline settings under the project:
Enable Auto Build (or Auto CI/CD)
When this is enabled and a global .gitlab-ci.yml script is configured for the Gitlab instance, Gitlab CI will always use this when pushing to the repo, overriding any custom .gitlab-ci.yml that has been added to the repo.
I know DevOps is all about giving power to the developer by moving the responsibility of builds/releases into their hands, however, I don't think it needs to be all or nothing. Having the ability to use CI/CD without needing to mess with complicated build scripts will be useful for many people I think.
What do you think? Would anyone else be interested in this?