Author : HASSAN MD TAREQ
Overview
- Pipelines within Azure DevOps is the CI/CD tool that allows the building, testing and deployment of code using DevOps practices
- Azure Pipelines provide build and release services to support continuous integration (CI) and continuous delivery (CD) of your apps
- Azure Pipelines combines CI and CD to constantly and consistently test and build your code and ship it to any target
- Defined in YAML file
- Code can be pulled from Azure Repos or external repo (i.e. GitHub)
- Run tests during pipeline
- Create reports within pipeline
- Publish artifacts
- Links
Creating a pipeline
Pipelines can be created in two ways:
- YAML file
- Classic editor
YAML file
- Select Pipelines > Click ‘+’ icon at top > New pipeline
- Select “Azure Repos Git” > Select Repo > ASP.NET Core (.NET Framework) > Save (top right)
- Give a commit message > save
Classic editor
- Select Pipelines > Click ‘+’ icon at top > New pipeline
- Click “Use the classic editor to create a pipeline without YAML” (at bottom)
- Select “Azure Repos Git” > Continue
- Select a template > Search “asp.net core” > Select “ASP.NET Core” > Apply
- Set Name (i.e. “CI-AzureDevOpsPipelineTest-Master”) > Save (not “save & queue”) > enter comment if you want > Save
- Click “Pipelines” from left panel > newly created pipeline will be shown
Settings
- Pipelines > Select the target pipeline
- Edit > set Task, Variables, Options etc.
ASP.NET Core web application that targets the full .NET Framework.
ASP.NET Core web application
Trigger
- Will run the pipeline when a commit is pushed to the remote
- Pipelines > Select target pipeline > Edit
- Triggers > Select under “continuous integration” > Tick (check box) “Enable continuous integration”
- Optionally you can check “Batch changes while a build is in progress” (multiple builds will be combined in a single run if needed)
- Set “Branch filters” and “Path filters”
- Save > enter comment > Save
- Now push a test commit > pipeline should run by CI trigger