DevOps Classroom notes 07/Apr/2025

Azure Pipelines

  • Azure Pipelines are written in YAML Format.
  • YAML is a data representation format with key value (name value) pairs as it basic structure.
  • The tool will define th structure
  • YAML represents data in name value
name: <value>
  • Values can be of following types
    • text
    • number
    • boolean
    • list/array
    • map/object
  • Text
title: Court
title: "Court"
title: 'Court'
  • numbers
duration: 149
rating: 9.5
  • boolean
imax: false
imax: no
  • list or array
cast: ["Priyadarshi", "Harsh", "Shivaji"]
cast:
- Priyadarshi
- Harsh
- Shivaji
cast:
  - Priyadarshi
  - Harsh
  - Shivaji
  • map/dictionary/object:
Crew:
  director: Ram Jagadeesh
  producer: Nani
  music: Vijay
  • complete yaml
---
title: Court
duration: 149
rating: 9.5
imaxEnabled: no
Cast:
  - Priyadarshi
  - Harsh
  - Shivaji
Crew:
  director: Ram Jagadeesh
  producer: Nani
  music: Vijay
  • Lets write about one more movie in the same yaml
---
title: Court
duration: 149
rating: 9.5
imaxEnabled: no
Cast:
  - Priyadarshi
  - Harsh
  - Shivaji
Crew:
  director: Ram Jagadeesh
  producer: Nani
  music: Vijay
---
title: Chhaava
duration: 161
rating: 9.2
imaxEnabled: no
Cast:
  - Vicky
  - Rashmika
  - Akshay
Crew:
  director: Laxman Utekar
  producer: Dinesh Vijan
  music: A.R Rehman
  • If we want some one to fill the movie we define fields and types
title: <text>
duration: <number>
ratings: <number>
imaxEnabled: <boolean>
Cast: text array | list<text> | list<string>
Crew: <Crew>

Crew:
director: <text>
producer: <text>
music: <text>

Understanding Azure DevOps Pipeline Concepts

  • pipeline structure (First Version)
  • An Agent i.e. a machine to build can be chosen at
    • Pipeline
    • Stage
    • Job
  • To Simplify the pipeline
    • If your pipeline has one stage and muliple jobs, then represent pipeline has set of jobs
    • If your pipeline has one stage, one job and multiple steps, then represent pipeline as set of steps

Lets create our first dummy pipeline

  • Lets create a pipeline which runs on microsoft hosted agent which will have Windows OS
  • It will have 3 stages
    • Build
      • It will have 1 jobs
        • build the code
    • System Test
      • It will have 1 job which starts the selenium tests
    • Deploy
      • It will have 1 job which runs the terraform
  • Pool defines the agents. Check for agent names
  • This is dummy as it will only print the value but not execute
---
name: dummy
pool: windows-2022
stages:
- stage: build
  jobs:
  - job: build
    steps:
    - script: echo Building
- stage: test
  jobs:
  - job: test
    steps:
    - script: echo testing
- stage: deploy
  jobs:
  - job: deploy
    steps:
    - script: echo deploying
  • I have one stage, one job and 3 steps
---
name: dummy
pool: ubuntu-latest
steps:
- script: echo step1
- script: echo step2
- script: echo step3

  • Pipeline generated in last session
trigger:
- main

pool:
  vmImage: ubuntu-latest

steps:
- task: Maven@3
  inputs:
    mavenPomFile: 'pom.xml'
    mavenOptions: '-Xmx3072m'
    javaHomeOption: 'JDKVersion'
    jdkVersionOption: '1.17'
    jdkArchitectureOption: 'x64'
    publishJUnitResults: true
    testResultsFiles: '**/surefire-reports/TEST-*.xml'
    goals: 'package'

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a comment

Turn on JavaScript to leave a comment.

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

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company
Exit mobile version
%%footer%%