In this article

Create your first pipeline

In this article

Azure Pipelines

This is a step-by-step guide to using Azure Pipelines to build a GitHub repository.

Prerequisites

You need an Azure DevOps organization. If you don't have one, you can create one for free. If your team already has one, then make sure you're an administrator of the Azure DevOps project that you want to use. (An Azure DevOps organization is different from your GitHub organization. Give them the same name if you want alignment between them.)

You need a GitHub account, where you can create a repository.

Get the sample code

You can use Azure Pipelines to build an app written in any language.
Select a sample repository of your choice from the following languages and fork it into your own GitHub user account:

If your repository already contains an azure-pipelines.yml file (which is the case for the sample repositories in this article), then that file will be used, and you'll see a Run button. Click it to start a build.

If your repository doesn't have a YAML file, Azure Pipelines recommends a starter template based on the code in your repository. You'll see a Save and run button instead of Run. Select Save and run, then select Commit directly to the master branch, and then choose Save and run again.

Wait for the build to finish.

Add a CI status badge to your repository

Many developers like to show that they're keeping their code quality high by displaying a CI build status badge in their repo.

To copy the status badge to your clipboard:

In Azure Pipelines, go to the Builds page to view the list of pipelines. Select the pipeline you created in the previous section.

In the context menu for the pipeline, select Status badge.

Copy the sample Markdown from the status badge panel.

Now with the badge Markdown in your clipboard, take the following steps in GitHub:

Go to the list of files and select Readme.md. Select the pencil icon to edit.

Paste the status badge Markdown at the beginning of the file.

Commit the change to the master branch.

Notice that the status badge appears in the description of your repository.

Because you just changed the Readme.md file in this repository, Azure Pipelines automatically builds your code, according to the configuration in the azure-pipelines.yml file at the root of your repository. Back in Azure Pipelines, observe that a new build appears. Each time you make an edit, Azure Pipelines queues a new build.

Next steps

You've just learned the basics of using Azure Pipelines. Now you're ready to further configure your pipeline to run tests, publish test results, create container images, or even deploy the app to a cloud service. Follow a track for the language of your choice: