Thursday, March 21, 2019

Tips to implement Continuous Integration and Continuous deployment using Azure DevOps

If you are using Azure DevOps for Continuous Integration, and Continuous Deployment for SharePoint Framework projects, there are few tricks you might need to know to streamline the process. Microsoft has a good documentation here you should read first. You need to prepare both "Builds" for CI and "Releases" for CD. This article explains some of the tricks and tips that might help you to setup and maintain the Azure DevOps CI/CD process.

1. The first tip is to prepare the deployment account. This will prevent the errors in the deployment. Two steps would need to be completed.

a. Install o365 cli based on this procedure.
b. Login to Office 365 using the account that will deploy the solution. The procedure is listed here.

If you have not done this, you will have the error in deployment like the screen below.


2. The second tip is to set up the Build as in the screen shot below and verify the package generated.

The generated package can be verified by clicking the completed build->Artifacts->Drop and then browse the solution package. You can view each step with details to fix any issue.


3. The third tip is to set up the Release as in the screen shot below and verify the deployment. 


In order to trigger the release from build is to enable the push form Build as in the screen shot. Please note you could manually trigger the release and verify the result for each step.


4. The forth tip is to set up the security to protect the CI and CD. The permission can be configured as in the following screen shot.


5. The fifth tip is to back up the Build and Release. You could "clone" and "Export" the configuration for this purpose.

6. If your pipeline needs to retrieve secrets such as authentication keys, storage account keys, data encrypted keys, .PFX files, and password, you should use Azure Key Vault instead of in the local pipeline like variables. The detailed instruction is here.

I'll add other tips that would be helpful.

No comments:

Post a Comment