integrate Unfurl into Gitlab's CI/CD workflow
Problem to solve
Automatically run an Unfurl job when commits are made to either:
-
A git repository that contains an unfurl project.
-
A git repository that relies on gitlab's functionality for CI/CD (i.e. gitlab-ci.yaml or autodevops) and unfurl for the actual deployment. For example, the unfurl job could be a step in the CI/CD pipeline.
Requirements
- There should be minimal assumptions about where the Unfurl job will run. E.g. not assume its inside a Kubernetes cluster or nothing stopping it from being invoked in a serverless environment.
- Since Unfurl resolves differences and can incremental deploy changes we don't need to reply like Argo's GitOps Engine the way Gitlab CD does. But we might want to use Gitlab's Kubernetes Agent when deploying to a cluster.
- There should be a way pass metadata to Unfurl for the job, for example, a pseudo-header in a commit message. This is important in the beginning while Unfurl is immature and often needs manual direction.
- Unfurl jobs should be able to update the unfurl project repository and push local commits upstream. So being able use Gitlab's deployment keys and tokens is probably important.
- Unfurl currently doesn't support locking so if possible should leverage that functionality in gitlab-cd, e.g. if gitlab runner supports locking.
Edited by Adam Souzis