Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Introduction To Azure DevOps

DZone 's Guide to

Introduction To Azure DevOps

If you've heard of one of Microsoft's newest DevOps tools, check out this article for more.

Free Resource

Azure DevOps formerly known as (VSTS) is a recent continuous integration (CI) and continuous delivery (CD) service provided by Microsoft. It works with any managed Git provider and can deploy to most major cloud services, which allow for Azure services. Azure DevOps provides pipelines to configure and automate builds and releases to different environments. These pipelines can be in YAML or as visual models in the Azure DevOps webpages. Azure DevOps is a fast way to automate build (CI) and deploy (CD) projects and make them available to users.

Pre-requisites:

  • Azure subscription, a free account can be created using this URL.
  • Github account (or) Azure Repos (or) TFS.

Create Azure DevOps Organization

  • First step is to navigate to https://dev.Azure.com and sign in to Azure DevOps. If never done before, a new organization needs to be created.

Image title


At least one organization is needed to store project and repositories, set up teams, and manage access to data.

Create a Build Pipeline

To set up a build pipeline in Azure DevOps. Go to https://dev.azure.com and create a new project inside the organization created in the previous step. Use the settings shown in this figure.

Image title


After click create project button, project will created, and a summary page for the project can be seen. Navigate to pipelines and click on builds as shown in below figure.

Image title


After created a new build pipeline, choose a repository on the prompt. Select the Github/Azure Repos repository, where the authentication to GitHub is. Click Authorize, and click the Azure repos git.

Image title


Select the repository name that has the source code present for the respective job.

Image title


Pipelines can be configured in two ways, using the starter pipeline.

Image title

or a .yaml file.

# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

trigger:
- master

pool:
  vmImage: 'Ubuntu-16.04'

steps:
- script: echo Hello, world!
  displayName: 'Run a one-line script'

- script: |
    echo Add other tasks to build, test, and deploy your project.
    echo See https://aka.ms/yaml
  displayName: 'Run a multi-line script'


The yaml file needs to saved and run.

Image title


Click the Existing Azure pipelines yaml file, if the yaml file exists. In the git repository, for example, helloworld.yaml file, select the branch and path for that yaml file, then click continue to commit to git.

Image title


After build is succeeded, get logs for that job,can be seen in the logs section.

Image title


To see the logs for certain task, click the certain task.

Image title


Topics:
azure automation ,azure pipelines ,azure devops ,continious integration ,contineous delivery ,devops

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}