Implementing CI and CD pipelines helps to ensure consistent and quality code that’s readily available to users. Azure Pipelines is a quick, easy, and safe way to automate building your projects and making them available to users,
This blog post shows how to create a build definition using, Azure Pipelines, that will automatically build the web application with every commit of source code.
This will lay the groundwork for you to then create a release pipeline for publishing the code to our Azure environments.
Create a build pipeline
In your Azure DevOps project, select the Pipelines menu option from the left-hand navigation.
Click the New pipeline button to create a new build pipeline.
This starts a wizard where you’ll first need to select where your current code is located. In a previous step, you pushed code up to Azure Repos. Select the Azure Repos option.
Next, you’ll need to select the specific repository where your code was pushed. In a previous step, you pushed it to the GITS repository. Select the GITS git repository.
Then, you’ll need to select the type of pipeline to configure. Since GITS solution is an ASP.NET web application, select ASP.NET from the list of options.
Click the Save and run button to save our new pipeline and also kick off the first build.
The new azure-pipelines.yml file will automatically be added to the root of your GITS repository. This is done through a git commit that Azure DevOps facilitates.
You are then asked to enter a commit description. By default, it will be populated for you. Once again, click the Save and run button at the bottom of the screen.
The build process will immediately begin and run through the steps defined in the azure-pipelines.yml file. Your Azure DevOps screen will refresh to show you the build process executing, in real-time.