DevOps Classroom notes 08/Apr/2025

Configuring Self hosted Agent in Azure DevOps

Lets create an Ubuntu 24.04 Agent

  • Softwares:
    • Openjdk
    • Maven
  • Azure DevOps Agent Setup:
    • This requires a PAT (Personal Access Token)

Activity

  • Lets create a pipeline to build the maven project
  • Azure Devops YAML Schema
  • Generic Pipeline:
    • When to run
    • What has to be executed
    • Where it has to run
    • metadata
  • In Azure DevOps Pipelines
    • What is decided by steps
    • Where is decided by pool section
    • when is decided by triggers
  • Manual step
git clone <url>
cd <folder>
mvn package
  • When: whenver any change is pushed to main branch
  • Where: ON a self hosted agent
  • Refer Here for the first pipeline
name: spring-pet-clinic

trigger:
  - main

pool: Default

steps:
  - script: ./mvnw clean package
  • Lets try using Task

name: spring-pet-clinic

trigger:
  - main

pool: Default

steps:
  - task: Maven@4
    displayName: Maven Build
    inputs:
      mavenPOMFile: 'pom.xml'
      goals: 'package'
      testResultsFiles: '**/surefire-reports/TEST-*.xml'

Azure DevOps Steps

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%%