Separate Deployment to K8s from the Deploy.yml template of AutoDevOps
Problem to solve
In order to expand our AutoDeploy template to more than Kubernet4es, we must separate the Deploy_To_Kubernetes jobs into a dedicated template that is called form the autoDeploy stage.
Intended users
Further details
As preliminary work for #208132 (comment 307019587), we need to extract the deployment of Kubernetes portion of the AutoDeploy template to a stand-alone template. This will allow us scalability and flexibility in the future, as now we are adding a Deploy_to_ECS and in the future we will introduce Deployment to other cloud providers.
The reason that we are not simply renaming the AutoDeploy template is in order not to introduce a breaking change to the users that are already using AutoDeploy.
Proposal
Existing Yaml should not be changed
What should change is https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml
-
Separate Deploy Kuberneters jobs to a new yaml template called 'Deploy_Kubernetes.gitlab-ci.yml` -
reference the new template from the 'Deploy.gitlab-ci.yml' file (by using include) -
Verify that the new Deploy.gitlab-ci.yml works like the old one -
Document 'Deploy_Kubernetes.gitlab-ci.yml` as a composable DevOps template