NashTech Blog

Set Up CI/CD in Minutes with Azure Pipelines

Table of Contents

Continuous Integration (CI) and Continuous Deployment (CD) are essential practices in modern software development. With Azure Pipelines, you can automate your build, testing, and deployment processes with minimal setup.

This guide walks you through setting up a simple and effective CI/CD pipeline.

What is Azure Pipelines?

Azure Pipelines is a cloud-based service that helps you:

  • Automatically build your code
  • Run tests
  • Deploy applications to various environments

It supports multiple languages (Node.js, Java, .NET, Python, etc.) and integrates with GitHub, Bitbucket, or Azure Repos.

Prerequisites

Before starting, make sure you have:

  • An Azure DevOps account
  • A source code repository (GitHub or Azure Repos)
  • A basic project (e.g., Node.js, Java, .NET)

CI/CD Overview

A typical pipeline looks like this:

Step 1: Create a Pipeline

  1. Go to Azure DevOps
  2. Navigate to Pipelines → Create Pipeline
  3. Choose your repository (Azure Repos, Github or Bitbucket Cloud)

Step 2: Configure pipeline (YAML)

Azure Pipelines uses YAML to define automation steps.

  • Trigger: defines when the pipeline runs
  • Pool: specifies the machine/environment to run the pipeline
  • Steps: a sequence of tasks executed in order
trigger:
- main

pool:
  vmImage: 'ubuntu-latest'

steps:
- checkout: self

- task: NodeTool@0
  inputs:
    versionSpec: '18.x'

- script: npm ci
  displayName: Install dependencies

- script: npx playwright install --with-deps
  displayName: Install browsers

- script: npx playwright test --reporter=junit,html
  displayName: Run tests

Note: You can customize each step depending on your project needs

  • Use environment variables for secrets (e.g., credentials, API keys)
  • Replace script with predefined tasks (e.g., Docker, Azure CLI)
  • Add conditions (e.g., run only if previous step succeeds)
  • Split steps into multiple stages for more complex pipelines

Step 3: Add Continuous Deployment (CD)

After tests pass, you can extend the pipeline to deploy your application:

- script: echo "Deploying application..."
  displayName: Deploy

How to Read CI/CD Reports

After each run, you will see:

  • ✅ Success (Green): Everything passed
  • ❌ Failure (Red): Something broke
  • ⏱️ Logs: Step-by-step execution details

Focus on:

  • Which step failed
  • Error messages
  • Test results

Benefits of CI/CD

  • Faster delivery: CI/CD automates build, test, and deployment → release faster
  • Early bug detection (CI): Issues are caught early through continuous testing
  • Automatic deployment (CD): Code is deployed quickly and consistently
  • Reliable process: Reduces human errors with standardized pipelines
  • Better collaboration: Teams integrate code frequently, fewer conflicts

Conclusion

CI/CD with Azure Pipelines helps teams automate repetitive tasks, improve code quality, and deliver software faster. With just a simple YAML configuration, you can build a scalable and reliable workflow for your projects.

Picture of Dai Pham Ngoc

Dai Pham Ngoc

Suggested Article

Scroll to Top