Digital.ai Release and Argo CD (2/2)
This article is based on the official documentation and sample article. It’s a version based on minikube rather than on AWS with a step by step approach. The article is divided in two parts:
- the “Continuous Delivery” scenario
- the “Environment Promotion” scenario (this article)
To demonstrate the integration of Digital.ai Release with Argo CD, we are going to implement the “Environment Promotion” scenario.
If you directly want to show the sample in action check the video first!
The Promotion Environment Scenario
- The application has been synchronized on the dev environment (the source environment)
- The application is promoted to the uat environment (the target environment)
Step 1: Preparation
Everything is already up and running if you followed my first article.
Step 2: Initiate the promotion
To initiate the promotion from one environment to the next one, we simply need to start a new release based on the “Environment Promotion” template.
The “Environment Promotion” template contains only the tasks needed for the promotion. It could be used on a more complete example that could include automatic test tasks, manual tests tasks, validation tasks….
The template is very similar to the “Continuous Delivery” scenario. This is actually the same objective: in order to promote an application, we need to modify the manifest file for the target enviroment and set the version of the image equals to the one of the source environment.
To initiate the promotion from the dev environment to the uat do the following:
- Get the tag of the dev environment
- Create a new release based on the “Environment Promotion” template
- Set the input variables as follow:
Variable name | Value | Note |
---|---|---|
ARGO_APP_NAME | helloworld-uat | |
NEW_TAG | Paste the tag you copied | |
GIT_REPO_URL | https://github.com/sblin/release-argo | Change to your repo |
GIT_REPO_NAME | release-argo | Change to your repo |
LOCAL_GIT_CLONE_PATH | /tmp/tmpargo | This is a temporary directory used to clone the repo locally (cleaned at the end). |
MANIFEST_PATH_IN_GIT | argocd/helloworld-cd/dev | |
MANIFEST_FILE | helloworld.yaml | |
PULL_REQUEST_NO | Set any number | |
CONTAINER_NAME | helloworld-uat-container |
Start the release to promote the application from the dev environment to the uat.
Video
See it in action!!