Simple multi-stage CICD YAML pipeline for Azure DevOps

  1. I’ve created a sample Angular+Node app to deploy and its structure is as shown below-
  • Stage 1: Build
    In this stage, I’m installing the required packages and libraries. Then building the Angular app and move the build to the ‘backend/dist’ folder from where it will be served by my Node app. Then as we only have to deploy the ‘backend’ folder to the App service, we will zip the backend as an artifact and publish it to the artifact staging directory.
  • Stage 2: Maintainance Environment Deployment
    This is a deployment stage, and we will be deploying the zipped artifact we created in the build stage. We will trigger this stage only if we are pushing changes to the MAINT branch, this is controlled by the condition in this stage. We also need to enter the ‘service connection name’ and the ‘app name’ in the deployment task to make the App service deployment.
  • Stage 3, 4:
    These stages are similar to stage 2, the only difference is they check for changes in different branches and make the deployment to their respective App service/Environment.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abhijeet Pandhe

Abhijeet Pandhe

Full Stack Web Developer and a tech enthusiast XD