This article is a mirror article of machine translation, please click here to jump to the original article.

View: 10117|Reply: 1

Azure DevOps 2020 (IV) Compiled jobs using Pipelines

[Copy link]
Posted on 9/9/2020 3:30:13 PM | | | |
Azure DevOps 2020 (1) First Introduction to Microsoft Azure DevOps (TFS)
https://www.itsvse.com/thread-9239-1-1.html

Azure DevOps 2020 (II) Azure DevOps Server Express 2020 RC2 installation tutorial
https://www.itsvse.com/thread-9375-1-1.html

Azure DevOps 2020 (III) limits search (ES) memory footprint
https://www.itsvse.com/thread-9371-1-1.html


Azure Pipelines is a cloud service that you can use to automatically build and test your code projects and make them available to other users. It works in almost any language or project type.

Azure Pipelines combines continuous integration (CI) and continuous delivery (CD) to continuously test and build your code and deliver it to any target.

You can use multiple languages in Azure Pipelines, such as Python, Java, JavaScript, PHP, Ruby, C#, C++, and Go.

Prerequisites

Since I am compiling a .NET Core project, I need to install the corresponding SDK on the server, pleaseDetermine whether you need to install it according to your actual situation



Before running the pipeline, we also need to configure the proxy pool.Simply put, it is a module that helps you perform tasks

To build code or deploy software with Azure Pipelines, you need at least one agent. As more code and people are added, more will eventually be needed.

When the pipeline is running, the system starts one or more tasks. An agent is a compute infrastructure with installed agent software that runs one job at a time.

After you install Azure DevOps Server 2020, there is no agent by default. You can view it by clicking: Home -> Collection Settings -> Pipelines -> Agent Pool -> Default -> Agents.

Since I have installed an agent myself, you can see that the default is empty.



New agent

System Environment Requirements:

  • Windows 7, 8.1, or 10 (if using a client operating system)
  • Windows 2008 R2 SP1 or later (if using a server operating system)
  • PowerShell 3.0 or later
  • .NET Framework 4.6.2 or later


For example, on Windows system, the download proxy is:
The hyperlink login is visible.

Download and extract it to the "D:\agent\vsts-agent-win-x64-2.170.1" directory and run the following command via PowerShell:

Enter the Azure DevOps URL address and select Negotiate as the authentication method.

(Use vsts-agent to connect to Azure DevOps Server 2020 to configure the agent client, and you can log in through PAT, Negotiate, Integrated, and Alternate.) )



For information about uninstalling agents, see

TF400813: 资源不可用于匿名访问。需要进行客户端身份验证
https://www.itsvse.com/thread-9377-1-1.html

You can view the status via Home -> Collection Settings -> Pipelines -> Agent Pool -> Default -> Agents.

The project is submitted to Azure DevOps

Use VS 2019 to create a new .NET Core 3.1 library project and migrate to Azure DevOps. (omitted)



Create a new pipeline

Define pipelines using YAML syntax

The process is as follows:



Go to the project, select Pipelines -> Pipelines -> Create a new pipeline, select "Azure Repos Git", select the current project, and configure the pipeline to choose any one (for example: ASP.NET Core (.NET Framework)), because they are all configuration files that generate YAML syntax.




We need to modify the yml file, which will be generated by default, and modify the file as follows:


Click "Save and Run" in the top right corner. The results of the implementation are as follows:





You can check the D:\agent\vsts-agent-win-x64-2.170.1\_work\4\s\dotnet-pull-nuget\bin\Release\netcoreapp3.1 folder to find the successfully compiled file.

(End)





Previous:TF400813: 资源不可用于匿名访问。需要进行客户端身份验证
Next:Nuget Series 2 uses BaGet to build private Nuget services
 Landlord| Posted on 9/9/2020 9:08:30 PM |
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com