Azure pipeline is a process to provide CI/CD pipeline automation process. It has the following compoment. Build Process: - Azure pipeline ...
Azure pipeline is a process to provide CI/CD pipeline automation process. It has the following compoment.
Build Process:- Azure pipeline creates a virtual machine( which you can't see in the VMS) and source code ( From Azure Repos) is built on this virtual machine. This virtual machine could be windows/Linux/Mac. It is an intermediate environment to build the application. Once the application is built then this virtual machine is disposed of.
This VM is an agent which is a part of the agent pool and there are different types of agents depending upon which type of VM is selected in the Azure pipeline
Let's Create the first Azure Pipeline using MS-hosted Agent (using the script not the classic editor in this example)
Example-1
1. Select the Azure pipelines and then click on Create Pipeline
2. Select the Azure Repo where the source code is available ( It can be Azure Repo/ Github/Bitbucket etc). You can select Azure Repo in case the code is in the Azure repository.
3. Select the repository where the code is available.
4. Once the repository is selected then it shows the pipeline code so let's replace the code with the below code.
5. Click on Save and Run button to run the pipeline, select the branch as master and click on run.
6. Azure pipeline should run a job
Example -2
Follow the same steps as mentioned above to create a new pipeline using the below code. In this example, there are multiple jobs that are configured in the pipeline
Output
Azure pipeline for an Asp.net Core application
1. In Azure pipelines select New Pipeline.
2. Select Azure Repo which has asp.net core app source code.
3. Select the pipeline build platform (Aspnet core) .NET Framework
4. Write the pipeline code similar to the given below
5. Save and run the pipeline.
Note:- Change the source code in the master branch and you will notice that the pipeline is executed automatically.
COMMENTS