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
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)
|