Key concepts

  1. What is Azure Pipelines?
  2. Overview of Continuous Integration and Continuous Deployment (CI/CD)
  3. YAML Pipelines vs. Classic Pipelines
  4. Pipeline hierarchy: Pipelines → Stages → Jobs → Steps
  5. Agents and agent pools: What runs your pipeline?
  6. Variables and templates for reusability
  7. Triggers: Manual, CI, PR-based
  8. Artifacts: Sharing outputs between jobs or stages
  9. Example YAML pipeline walkthrough

1. What is Azure Pipelines?

Azure Pipelines is a cloud-based continuous integration and continuous delivery (CI/CD) service provided by Azure DevOps. It enables teams to automatically build, test, and deploy code to various environments such as development, staging, and production.

2. Overview of Continuous Integration and Continuous Deployment (CI/CD)

CI (Continuous Integration)

Automates building and testing your code every time you commit changes. It ensures that integration issues are caught early.

CD (Continuous Deployment/Delivery)

Automates the delivery or deployment of your application to staging or production environments after a successful build.

3. YAML Pipelines vs. Classic Pipelines

4. Pipeline hierarchy: Pipelines → Stages → Jobs → Steps

Pipeline Hierarchy

5. Agents and agent pools: What runs your pipeline?

6. Variables and templates for reusability

7. Triggers: Manual, CI, PR-based

Triggers define when your pipeline should run:

8. Artifacts: Sharing outputs between jobs or stages

Artifacts are files or packages (e.g., build outputs, test results) produced by one job/stage and consumed by another.

Examples

9. Example YAML pipeline walkthrough

trigger:
  branches:
    include:
      - main

pool:
  vmImage: 'ubuntu-latest'

variables:
  buildConfiguration: 'Release'

stages:
- stage: Build
  jobs:
  - job: BuildJob
    steps:
    - task: DotNetCoreCLI@2
      inputs:
        command: 'build'
        projects: '**/*.csproj'
        arguments: '--configuration $(buildConfiguration)'

- stage: Deploy
  dependsOn: Build
  condition: succeeded()
  jobs:
  - job: DeployJob
    steps:
    - task: AzureWebApp@1
      inputs:
        appName: 'my-app-service'
        package: '$(Build.ArtifactStagingDirectory)/**/*.zip'