Introduction To Azure DevOps
If you've heard of one of Microsoft's newest DevOps tools, check out this article for more.
Join the DZone community and get the full member experience.
Join For FreeAzure 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.
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.
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.
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.
Select the repository name that has the source code present for the respective job.
Pipelines can be configured in two ways, using the starter pipeline.
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.
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.
After build is succeeded, get logs for that job,can be seen in the logs section.
To see the logs for certain task, click the certain task.
Opinions expressed by DZone contributors are their own.
Comments