Azure DevOps YAML

Share

        Azure DevOps YAML

Azure DevOps YAML is a configuration file format used to define continuous integration and continuous delivery (CI/CD) pipelines in Microsoft’s Azure DevOps platform. It allows you to define your build, test, and deployment processes as code, which can be versioned along with your source code.

Here’s a basic example of an Azure DevOps YAML pipeline for building and deploying a simple web application:

yaml
trigger: - main # Trigger the pipeline when changes are pushed to the 'main' branch pool: vmImage: 'ubuntu-latest' # Use an Ubuntu VM for the pipeline steps: - script: echo 'Hello, Azure DevOps!' # Run a simple script as the first step displayName: 'Print Message' - task: NodeTool@0 # Use Node.js for subsequent steps inputs: versionSpec: '14.x' displayName: 'Install Node.js' - script: npm install # Install project dependencies displayName: 'Install Dependencies' - script: npm run build # Build the project displayName: 'Build' - task: PublishBuildArtifacts@1 # Publish build artifacts inputs: pathtoPublish: 'dist' artifactName: 'webapp' displayName: 'Publish Artifacts'

In this example, the YAML file begins with a trigger section that defines when the pipeline should be triggered (in this case, when changes are pushed to the ‘main’ branch). The pool section specifies the type of virtual machine to be used for the pipeline’s execution.

The steps section contains a list of tasks that will be executed in sequence. Each task can be a built-in task provided by Azure DevOps or a custom script. In this example, the pipeline runs a series of steps including printing a message, installing Node.js, installing project dependencies, building the project, and finally publishing the build artifacts.

You can customize your pipeline further by adding more tasks, integrating with various tools and services, setting up deployment stages, and more. Azure DevOps YAML pipelines offer flexibility and repeatability in defining your CI/CD workflows, and the configurations can be version-controlled along with your source code for easier collaboration and tracking of changes.

Demo Day 1 Video:

You can find more information about DevOps in this DevOps Link

 

Conclusion:

Unogeeks is the No.1 IT Training Institute for DevOps Training. Anyone Disagree? Please drop in a comment

You can check out our other latest blogs on  DevOps here – DevOps Blogs

You can check out our Best In Class DevOps Training Details here – DevOps Training

💬 Follow & Connect with us:

———————————-

For Training inquiries:

Call/Whatsapp: +91 73960 33555

Mail us at: info@unogeeks.com

Our Website ➜ https://unogeeks.com

Follow us:

Instagram: https://www.instagram.com/unogeeks

Facebook:https://www.facebook.com/UnogeeksSoftwareTrainingInstitute

Twitter: https://twitter.com/unogeeks


Share

Leave a Reply

Your email address will not be published. Required fields are marked *