This is a great alternative to Travis CI or Circle CI. I've been using it quite a bit for a number of projects recently, and have been very happy with the results.
Test a github project without committing
If you want to debug a pipeline without committing code to your github repo, you can do the following:
- Login to Azure Devops
- Click + New project
- Give the project a name, specify Private for the Visibility, and click Create
Once the project has been created, you'll need to import the repo code:
- Click on Repos in the left-hand menu
- Click Import
- Specify the URL for your project and click Import
You should now be able to modify the azure-pipelines.yml
file local to the project you've created. However, you will need to set up the Pipeline in order to start seeing test results:
- Click Pipelines in the left-hand menu
- Click Create Pipeline
- Select Azure Repos Git
- Click the Project you created previously
- Modify the yaml if you'd like, otherwise click Run
Delete a Project
- Login to Azure Devops
- Click on the Project you want to delete
- Click the gear icon in the bottom left-hand menu
- Click Delete
- Type in the name of the project and click Delete
Create a trigger that runs a specific pipeline
This can be used to have a pipeline for a specific area of your project. The idea is you have multiple pipelines to test certain things, so that you don't end up with a massive monolith:
trigger:
branches:
include:
- master
paths:
include:
- path/to/specific/area/of/project/*
- Tests/project*
- azure-pipelines-project.yml
Specify Behavior for Pull Requests
This will dictate what to do whenever you do a pull request. In this case it will run a pipeline to test a specific area of a project:
pr:
branches:
include:
- master
paths:
include:
- path/to/specific/area/of/project/*
- Tests/project*
- azure-pipelines-project.yml
Run Pipeline on a schedule
schedules:
- cron: "0 0 * * 0"
displayName: Weekly midnight (UTC) build
branches:
include:
- master
always: true