Create ProjectAutoDevops with every new Project
Problem to solve
Make it easier enrol new users of Auto DevOps in new Auto DevOps features without affecting existing projects.
Some improvements, while considered stable, cannot be enabled for existing users automatically as they could break their applications.
We currently have at least two important issues that could benefit from this:
- Enabling Cloud Native Buildpacks as the default build method for new projects only #212692 (comment 363148634)
- Rolling Auto DevOps out on GitLab.com for a fraction of new projects only, leaving existing project alone #220049
Change the code so that any time a new
Project is created, we also create a corresponding
ProjectAutoDevops. Since the
project_auto_devops.enabled column defaults to
null, new projects will still delegate to the existing namespace and instance hierarchy to decide if the project should actually use Auto DevOps.
- For rolling out Cloud Native Buildpacks, we can add a new colum
project_auto_devops.cnb_enabledwhich defaults to
nullfor existing records, and pass down a variable
AUTO_DEVOPS_BUILD_IMAGE_CNB_ENABLEDto the pipeline if
project.auto_devops_enabled? && project.auto_devops&.cnb_enabled?
project.auto_devops_enabled?also queries the namespace and instance hierarchy)
- For rolling out Auto DevOps to new projects on GitLab.com via a feature flag, we would be able to set
project_auto_devops.enabledbased on the value of the feature flag, e.g.