DevOps Classroom Series – 30/May/2020

Azure DevOps

  • Azure DevOps offers services to

    • Plan work
    • Source Code Management
    • Build and Deploy application
  • Visual Studio Team Services is now Azure DevOps

  • Azure DevOps has two modes

    • Azure DevOps Services:
      • This is a hosted service.
      • On Azure Cloud Azure DevOps is hosted
    • Azure DevOps Server
      • You need to install the Server
      • Generally used for On-Premise builds and deployments
  • Azure Services

    • Azure Repos:
      • Git or Team Foundation Version Control
    • Azure Pipelines
      • provides build and release pipelines for delivery of application
    • Azure Boards
      • set of Agile tools to support planning, tracking work using kanban and Scrum
    • Azure Test Plans
      • Tools to test apps
    • Azure Artifacts
      • Like artifactory a binary repository with Maven, npm, nuget etc capabilities.
  • Azure DevOps Services:

    • Option 1: Using Azure Login
    • Option 2: Create an azure DevOps Services signin using GitHub from here
  • Create an Organization and Project in Azure DevOps Services Preview

Azure DevOps Interfaces

Azure DevOps Pipelines

  • Note: This whole series is assuming you know Jenkins and Jenkins Pipelines
  • Lets do the basic comparision

Jenkinsfile vs azure-pipelines.yml

  • In Jenkins the pipleines are configured in Jenkinsfile and in azure-devops we create the pipeline in azure-pipelines.yml
  • Example Jenkinsfile
pipeline {
    agent any
    stages {
        stage('build') {
            steps {
                git ''
                sh 'mvn package'
  • Same in azure-pipelines.yml
  - job: build
      - script: git clone ''
      - script: mvn package
  • Jenkins Pipeline Structure Preview

  • Azure Pipeline Structure Preview

  • note: Agent is exactly like Jenkins Node

  • Agents: Agents are of three types

    • Microsoft Azure Agents:
      • These agents are created/managed By DevOps pipeline in Azure
      • Need to know the names of the image/label Refer Here
    • Self-Hosted
    • Container
  • Agents are grouped as Agent pools and Each agent will have capabilities.

  • In Jenkins We Use Parameters to pass inputs to the Job, Same in Azure DevOps.

  • In Jenkins we use pipeline steps reference Refer Here and in the case of Azure DevOps we use tasks for actual activities Refer Here

  • YAML Schema References

Scenario: Build a Java Project on Microsoft Hosted Agent

  • Open the project in visual studio code (gameoflife) and ensure azure devops extensionis installed Preview

  • Lets write a pipeline

  - master
  - develop

  name: KhajaLearning

  - stage: Build
      - job: 'BuildJob'
          - task: Maven@3
              goals: deploy
              mavenPomFile: 'pom.xml'
              publishJUnitResults: true
              testResultsFiles: '**/surefire-reports/TEST-*.xml'
              javaHomeOption: 'JDKVersion'
              mavenVersionOption: 'Default'
              mavenAuthenticateFeed: false
              effectivePomSkip: false
              sonarQubeRunAnalysis: false
      - job: 'Deploy'
          - task: Bash@3
              targetType: inline
              script: 'terraform init ./deployment/ && terraform apply -auto-approve ./deployment/'


  1. Configure Git Repos

  2. Add azure-pipelines.yaml

  3. Configure Artifacts and create feed (if required)

  4. Maintain the structure and look at YAML task definitions Refer Here

  5. Exercise: Create a azure devops pipeline for spring pet clinic

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin