Creating a Build Pipeline with a Single Job

Creating a Build Pipeline with a Single Job

After setting up the build and deployment agent in the previous few posts, now we will be going to create our first build pipeline on the Azure DevOps portal. Before starting, you need to create an Azure repository for your source code.

There are two methods to create a build pipeline: the classic editor, a GUI for drag-and-drop assembly of pipeline components, and YAML (Yet Another Markup Language), which allows for advanced customization of the Azure pipeline using markup language. In this post, we will concentrate on using the classic editor.

Let’s create an empty job to see how it works:

1. Click on your project name from the web portal, and then click Pipelines | Create Pipeline:

New Pipelines

2. Click on Use the classic editor:

Classic Editor

3. Choose Azure Repos Git, an existing source code repository service under Azure DevOps, which is highly compatible with other Azure DevOps services like Azure Pipelines used in this demo.

Select the options displayed in the following screenshot for Team Project, Repository, and Default Branch for manual and scheduled builds to initiate an Azure pipeline. Then, click Continue:

Choosing the Default Branch

4. Click on Empty Job. The template provides a single job that contains tasks for your pipeline. We will start with an empty job so that you can learn the basic settings from the menu before we select all the templates that will be suitable for each project.

Build Template

The additional options shown in the screenshot include:

- .NET Desktop: A template for building pipelines to compile and test .NET desktop solutions.

- Android: A template for building pipelines to compile and test Android APK files for Android applications.

- ASP.NET A template for building pipelines to compile and test ASP.NETweb applications.

- Azure Web App for ASP.NET: A template for building pipelines to compile, test, and deploy ASP.NET applications to Azure Web App services.

5. Click on the drop-down menu for Save & queue:

Saving a Build Pipeline

6. On the following screen, you can select a folder to save to and add a comment. Click on Save:

Confirming a build pipeline


7. After clicking Save, a list of all the build pipelines will appear, as follows:

Pipelines Dashboard


8. After you create a simple build pipeline, you can test it by clicking on the pipeline you want and clicking Run pipeline:

Running the Pipeline

9. Before running a build pipeline, you can configure specific options:

- Agent Pool: Choose between a Microsoft-hosted agent or a self-hosted agent.

- Agent Specification: Select the operating system for the agent to run the build pipeline.

- Branch/Tag: Specify the branch or tag for the build pipeline to run.

Run Pipeline Options

10. Finally, you can see the build result in detail and some summary information.

Detailed Build Result

You can also see the latest status on the build pipeline row:

Pipeline with the build result
In this section, you learned how to use the classic editor to make it easy to create a new build pipeline.        
"In our upcoming post, we'll explore how to create tasks under a job.


Microsoft Learn Microsoft Azure Microsoft Azure DevOps








要查看或添加评论,请登录

社区洞察

其他会员也浏览了