CloudOne-Pipelines: Continuous Integration and Continuous Delivery Pipelines - V 3.6
Continuous Integration and Continuous Delivery Pipelines
V3 CI/CD pipelines are YAML pipelines fully coded in YAML source files within Azure DevOps. Navigate to the appropriate pipeline, within a given project in Azure DevOps, as follows:
- Hover in the left pane over or click the Pipelines icon and then select Pipelines
- Scroll through the right pane to find the Application Stack of interest and click to select it
- Then the right (main) pane will list different pipeline runs to select for status and details. Click to select the appropriate one.
- Once a specific pipeline run is selected, the right (main) pane will show the status of the overall run and any error messages. This pane will also display every stage of the pipeline and its respective status.
- Each stage pane can be clicked to reveal more granular steps.
- Each of these steps can be further clicked to reveal log-level details.
Every pipeline starts with a Continuous Integration stage which builds the application (except in the case of an application stack like CAAS where a pre-buit container is used instead) and performs certain checks to ensure the readiness of the application to deploy and to meet internal standards and requirements for deployment in CloudOne, followed by preparation of the application for deployment.
As the Continuous Integration stage progresses, if continuing to success, it will:
- Confirm that the version of the application (as defined by the appVersion in the azure-pipelines,yml file) is unique and will not conflict with a previously deployed version
- Build the application using the appropriate software build method according to the application stack (or simply retag a container in the case of a CAAS application stack)
- Perform code coverage scanning (unless the application is a CAAS application stack for which there is no source code to evaluate)
- Scan the code for security vulnerabilities – if the code does not reach a mandated threshold score for security, the pipeline will not continue until the issues are resolved or the security team grants an exemption
After the Continuous Integration stage completes, the next stage of the pipeline will be triggered to begin deployment into the Workspace. Progression of the deployments can be tracked in Azure DevOps in exactly the same manner in which the Continuous Integration stage is tracked, with each workspace and hostspace to be deployed to being represented by its own stage in the pipeline.
Following the deployment of the application container into the development Workspace in OpenShift, the results of this deployment can be seen in the OpenShift web console at the URL: <https://k8s-east1-console.ncloud.netapp.com/console/project/XXX-workspace (where, again, XXX is the unique (usually) 3-letter appCode for the application).
Once the deployment of the application container is completed into the development Workspace, the pipeline will pause for up to 2 hours to allow Unit testing to be performed. Once Unit testing is completed, whether successful or not, the pipeline will clean up by removing the application container and all related deployment elements from the Workspace.
If the Unit Testing is confirmed as successfully completed, the pipeline will then continue in subsequent stages to deploy the container to remaining hostspaces, including Stage, Pre-Production and Production hostspaces, all of which are specifically listed in YAML structures within the azure-pipelines.yml file.
So a summary of the normal workflow of workspace and hostspace deployments for an application container is as follows:
- The application container is deployed to the development Workspace
- The pipeline will pause and wait for completion of Unit Tests and approval from a Development Lead to continue, indicating tests have been completed successfully
- The application version will be retagged to its final release tag and will then be deployed into one or more Staging Hostspaces
- The pipeline will once again pause awaiting the completion of User Acceptance Testing (UAT) in the Staging space(s)
- When UAT is complete, a member of the business stake-holder team will approve the pipeline to continue, which will cause the Git pull request to be approved and merged
- The pipeline will then continue with a deployment into one or more Pre-Production Hostspaces and pause again waiting for approval to release to Production
- Results of quality checks conducted earlier in the Continuus Integration stage are reviewed, including any exemptions granted, as a prerequisite to deployment into any Production Hostspaces
- Once approved to proceed by a member of the Operations Support team, the pipeline will release the application to Production in one or more Production Hostspaces and the pipeline will be complete
The following additional screen shots show examples of in-progress, failed and successful deployments through the initial stages as well as approval steps: