In a few simple steps, set up continuous integration for a GitHub repository using Azure Pipelines.
🕒 Duration: 5-10 minutes
- You'll need a GitHub account, where you can create a repository.
- You'll need a Microsoft account, otherwise known as a Live ID. If you already have one, such as a personal email address you use to sign into Windows at school or home, you can use it. Otherwise, create a new one.
- If you aren't already signed into GitHub, click Sign in at the top-right of this page. Enter your credentials to sign in.
- Fork this repository by clicking Fork at the top-right of this page.
- Choose to fork the repository in your personal GitHub account. GitHub will fork the repository and navigate to it in your account.
- Browse to https://github.com/apps/azure-pipelines and click Install (or Configure).
- Click the name of your GitHub account into which the repository was forked. Then click Install.
- After you're redirected to Azure DevOps, sign in with your Microsoft account (see Prerequisites).
- If this is your first time using Azure DevOps, an organization will automatically be created for you. Otherwise:
- If you see a drop-down labeled "Select your Azure DevOps organization," then click Create a new organization below it.
- Click Continue. An Azure DevOps organization will be created for you that is linked to your GitHub account's repositories.
- After you're redirected to the New pipeline page of your Azure DevOps organization, select your AtUniverse repository fork to create a pipeline for it.
- Select the Docker image template to build the repo's Dockerfile. Or, for an npm-only build, select Node.js.
- YAML text that defines your pipeline will be displayed.
- Click Save and run. In the pane that appears, select Create a new branch for this commit and start a pull request. Then, click Save and run at the bottom of the pane.
- The YAML file is pushed to a new branch of your GitHub repository, a pull request is created for it, and you'll see the pipeline run for the first time.
- Navigate to your repository fork in your GitHub account (ex:
https://github.com/janedoe/AtUniverse
). - Click the Pull requests tab and select the pull request that was created for you, named Set up CI with Azure Pipelines.
- At the bottom of the page, click Show all checks to see the build status of your pipeline.
- Near the top of the page, click the Checks tab. Select your build under the Azure Pipelines section to see more status information.
- Click on the Conversation tab near the top-left of the page. Click Merge to merge the pull request and enable continuous integration for your repository.
Now, your pipeline will automatically run to validate each pull request and when new code is merged into the master branch of your repository.
You've set up your first pipeline using Azure Pipelines. Consider trying these follow-on steps.
- In Azure Pipelines, go to the Builds page to view the list of pipelines.
- Select the pipeline that was created for you.
- Click ". . ." on the toolbar to view the context menu for the pipeline. Then, select Status badge (see the image below).
- Copy the Sample Markdown text to the clipboard.
- Paste the Markdown at the top of your repository's
README.md
file.
Create additional pipelines by clicking + New build pipeline from within Azure Pipelines.
Ask an Azure Pipelines representative how you can deploy your application to any platform or cloud.