Azure IoT DevOps Projects now General Available to help you easily initialize a CI/CD ready IoT Edge project
With the shift of modern software development, developers need to do more than ever. Having a CI/CD pipeline could help developers deliver value faster and more transparently. For Azure IoT Edge, we already have a built-in Azure IoT Edge task in Azure Pipelines to help you easily adopt DevOps with your Azure IoT Edge applications. Now we’re excited to announce the General Availability of IoT Azure DevOps Projects. With the IoT Azure DevOps Projects, you could easily initialize a new IoT Edge project with recommended CI/CD practices in a few clicks.
The IoT Azure DevOps Projects was initially released on December 2018 and we have updated the project recently with latest CI/CD practices for Azure IoT Edge projects. You can follow Create a CI/CD pipeline for IoT Edge with Azure DevOps Projects to create your own IoT Edge DevOps project. Here’re some big changes in the new version:
- Run unit test in CI build
- Add QA and PROD stages for full DevOps experience
- Generate deployment manifest during deployment
- New smoke test and roll back steps in each release stage
- Promote module images from test ACR to prod ACR when all test passed in QA stage
Run unit test in CI build
Running tests during CI builds could help find code defects at the earliest time. In the new IoT Edge DevOps Project, we added unit tests for all projects. You’re also able to add new tests and leverage the various Azure Pipelines built-in tasks to test your code.
Generate deployment manifest during deployment
The previous IoT Edge DevOps Project published the deployment manifest as a build artifact. Release pipeline will then use the pre-generated deployment manifest in the deploy step. In order to provide more flexible deployment experience, the Azure IoT Edge task provided a new action “Generate deployment manifest” which expands the image placeholder as well as environment variables in deployment.template.json. With the support of Azure IoT Edge task, the new IoT Edge DevOps Project is now able to generate the deployment manifest with actual image address and environment-related variables for each environment before deployment.
Adding QA and PROD stages for full DevOps experience
Previously the IoT Edge DevOps Project only have one DEV stage in the release pipeline to demonstrate how CI/CD works in Azure DevOps. Now we have added QA and PROD stages to provide full DevOps experience to you. The QA stage targets the environment that simulates the production environment as much as possible. It connects to as many services as it can to help you test all the components before your changes been applied to the production environment. The PROD stage will apply your changes to the production environment after the validations in QA stage passed. After that, your changes will be available to your end users.
New smoke test and roll back steps in each release stage
Automation test is a critical part of continuous delivery (CD). We provided smoke test script in the IoT Edge DevOps Project to verify all devices were connected to IoT Hub, the deployment created in current release pipeline has been applied and devices running the latest deployment are in healthy status. If an error occurs during the smoke test, the release pipeline will rollback the deployment to ensure the quality of the environment. You can also implement your own tests and run after IoT Edge deployment. The rollback will happen if any of previous tasks failed.
Promoting module images from test ACR to prod ACR when all verifications passed in QA stage
Since the environments of production and test are isolated, after all verifications passed in QA stage, we have tasks to promote IoT Edge module images from test ACR to prod ACR. In this way, we could ensure the images running in production environment are same as what we tested in test environments.
Have a Try!
If you follow the Create a CI/CD pipeline for IoT Edge with Azure DevOps Projects to create a new IoT Edge DevOps Project, the build pipeline will run automatically and then trigger the release pipeline. Each time you commit to the master branch, the build pipeline will run again and trigger the release pipeline to deploy your latest change. Just clone the repo to start developing your IoT Edge project with the help of CI/CD pipeline.
Your feedbacks are always important to us. Please share your feedbacks via comments below or email firstname.lastname@example.org.