A production-grade demonstration of Modern DevOps practices using Azure DevOps, Docker, and Node.js. This repository showcases a complete automated lifecycle—from code commit to containerized deployment on Azure App Service.
- Automated CI Pipeline: Multi-stage YAML pipeline for building, testing, and containerizing.
- Docker Integration: Optimized Dockerfile for Node.js production environments.
- Advanced CD Strategy:
- Deployment Slots: Zero-downtime deployments using Azure App Service staging slots.
- Manual Approvals: Integrated gatekeeping for production releases.
- Automated Rollbacks: Logic to handle deployment failures gracefully.
- Observability: Built-in health check endpoints for infrastructure monitoring.
The pipeline is split into three main stages:
- Build & Test: Installs dependencies, executes unit tests, builds the Docker image, and pushes it to Azure Container Registry (ACR).
- Deploy to Staging: Deploys the latest container to a staging slot for validation.
- Production Release: Requires manual sign-off before swapping slots to live traffic.
- Backend: Node.js, Express.js
- Testing: Mocha, Supertest
- Containerization: Docker
- Orchestration/CI-CD: Azure Pipelines (YAML)
- Cloud: Azure App Service, Azure Container Registry (ACR)
- Clone the repo:
git clone https://github.com/ihkokil/azure-devops-ci-cd-demo.git
- Install dependencies:
npm install
- Run tests:
npm test - Start the app:
npm start
To mirror this pipeline in your own Azure DevOps organization:
- Create a Service Connection to your Azure Subscription and Docker Registry.
- Update the variables in
azure-pipelines.yml(Registry URL, App Name, etc.). - Configure the
productionenvironment with Approvals and Checks.
This project is licensed under the MIT License - see the LICENSE file for details.