Simplify `.gitlab-ci.yml` on serverless projects
Problem to solve
Users currently have to define both
serverless.yml files in their repo to get started, however, the
gitlab-ci.yml template does not require any customized content and can be greatly simplified.
Once this layer is abstracted from the user, we can change the way we do serverless builds (ie bring them to GitLab CI instead of Knative build if desired) and in turn we make it easier to get started with Serverless.
Sasha, Software Developer, https://design.gitlab.com/research/personas#persona-sasha
Devon, DevOps Engineer, https://design.gitlab.com/research/personas#persona-devon
Implement a template that can be included into
.gitlab-ci.yml] and use
extends to explicitly import serverless jobs.
include: template: Serverless.gitlab-ci.yml serverless-build: extends: .serverless-build serverless-deploy: extends: .serverless-deploy
What does success look like, and how can we measure that?
Increased usage of the serverless feature, measured by increased deployments of knative app.
Treat projects as "serverless" as long as:= the following conditions are met:
- There's a
serverless.ymlfile defined in the repository.
- If a k8s cluster with Knative installed exists
If both conditions are met, automatically carry out the build process with the current approach.