Source Code Continuous Delivery Process
Deploy Code Changes
The function of the CD process is to deploy artifacts that were created by the CI process to the Staging and Production environment. The CD process runs automatically after the CI process has been completed or triggered manually within the CloudVanti Sitefinity Management Portal.
The codes deployment process leverages this pipeline:
- Azure DevOps Pipeline - <subscription-name>.SRC.CD
CloudVanti Sitefinity provides Deployment slots within the Production environment to help minimize downtime and acts as a precaution should it fail to deploy to the live website. To learn more about deployment slots, click here.
Here is the code deployment process in Staging:
- The Staging CD Pipeline will automatically be triggered once the code within the CI Pipeline is completed.
- The artifact created from CI Pipelines will be deployed to the Staging website.
- When the User is done testing in the Staging environment, they can approve the build to be deployed on Staging. The Production CD Pipeline will start automatically.
- If the User does not approve the Staging deployment the process will end here
- In the Production CD Pipeline, the artifact will be deployed to the Deployment slot.
- Then the primary database will be duplicated to the secondary database. The secondary database will be connected to the Deployment slot.
- Once the Deployment slot is ready it will be swapped with the Production slot. You can see here for more detail about Deployment Slot.
Promote Code To Staging Environment
Promoting the code is the action of publishing an artifact created from the CI process to the Staging environment. The process will start automatically once the CI Process has completed.
Here is how you can validate the Staging Code Deployment:
- From the CloudVanti Sitefinity Management Portal menu, select Pipelines. Then select Releases. You can check the state of the CD Process within the list of releases (<subscription-name>.SRC.CD).
- Should there be any unexpected complication when initiating the process, clicking the Create Release button in the upper right area will manually trigger the pipeline.
- To check on the Staging CD process, click on the STG part of stages on the release list.
- A list will appear where you can check the log for errors in the process of Staging CD Pipeline.
- Upon successful deployment, the Sitefinity will run within CloudVanti's Staging environment. The CD Pipeline will be in pending approval status before it can be deployed to the Production environment. The codes require verification that it can successfully run in Staging before proceeding to the next part of the deployment.
Promote Code To Production Environment
Once all of the testings have been done on the Staging environment, the code is ready to be promoted. This will publish the Artifact created from the CI process to the Production environment.
Here are the steps to validate the Production code for deployment:
- User Approval is needed for deployment within the Staging environment to start the Production Pipeline. A designated user will receive an email where they can approve the process.
- Alternatively, it can also be approved via the CloudVanti Sitefinity Management Portal.
- Select Pipelines. Then select Releases. Click on the PRD part of the stages from the list of releases (<subscription-name>.SRC.CD)
- Select Pre-deployment approvals and click view approval
- Submit your approval
- To check on the progress of the Production CD Pipeline, select Pipelines. Then select Releases. Click on the PRD part of the stages from the list of releases (<subscription-name>.SRC.CD).
- Click on Deploy Code to check the logs for any instance of the error.