Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
358 views
in Technique[技术] by (71.8m points)

Azure DevOps build pipelines fail when another build is already running

When using Azure DevOps I notice that occasionally my pull request builds will fail. After some tracking down I noticed that this is only happening when another build is already running.

It seems that the reason is that the files in the output for the build (exe, dll, note_modules, etc.) will be locked so when another build is started the new build will fail until the currently running one is finished, then I will have to manually re-queue the build again.

I am not very familiar with Azure DevOps pipelines since we recently migrated to this platform and also not sure of the best way to fix this issue. The sln's being built include .NET Framework, .NET Core, TypeScript, and Node.js if that helps at all.

I would love to post the logs and current configuration, but due to company policy I'm not allowed to... :(

question from:https://stackoverflow.com/questions/65557848/azure-devops-build-pipelines-fail-when-another-build-is-already-running

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Azure DevOps build pipelines fail when another build is already running

You could try to use/add a Capability, like Agent.Name to that two specific build agents then in the build definition you put that capability as a Demands.

As stated here:

How to send TFS build to a specific agent or server

The Capabilities of the agent:

Project Settings->Agent pools->Your agent pool-> Agents->Agent->Capabilities

The Demands of the build pipeline:

Options-> Demands:

enter image description here

In this case, when a pipeline is running in this particular agent, another new build will be in pending state until the current build is completed.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...