带有自托管代理的DevOps中的管道问题

问题描述 投票:2回答:1

[我和我的团队对此进行了详尽的研究,我们无法弄清楚为什么我们在Azure DevOps Pipeline中进行的构建不会将任何源代码下载到运行该构建的自托管代理中。

我们有一个名为“ ProjWindowsService”的项目,这是一个使用Topshelf的常规.NET Windows Service项目。

我们已将源代码签入DevOps的Repo中,该项目被映射到Build Pipline中,但是一旦代理运行了构建作业,它就无法找到源文件并给出错误:

MSBUILD: MSBUILD : error MSB1009: Project file does not exist.
Switch: c:\it\agent\3\s\XXXXXX.API.Integration.Domain\XXXXX.API.Integration.Domain.sln

基本上,代理程序的c:\ it \ agent \ 3 \ s下没有任何内容(我们的理解是,源文件应复制到该位置),除了$ tf本身没有文件。

因此,错误消息很合理,但是我们已经选择并尝试了多种方法来配置Build Pipline的Source部分,但没有成功。

Build Pipline Source非常感谢您提供一些帮助,以弄清为什么未将源代码下载到代理工作文件夹。

获取源日志:

##[command]tf vc workspace /delete ws_4_15%3Bccb20099-639d-42db-a116-f6f52fecd57d /collection:https://XXXXXX.visualstudio.com/ /loginType:OAuth /login:.,*** /noprompt

##[command]tf vc workspace /new /location:local /permission:Public ws_4_15 /collection:https://XXXXX.visualstudio.com/ /loginType:OAuth /login:.,*** /noprompt

##[command]tf vc workfold /unmap /workspace:ws_4_15 $/ /collection:https://XXXXX.visualstudio.com/ /loginType:OAuth /login:.,*** /noprompt

##[command]tf vc workfold /map /workspace:ws_4_15 "$/XXXXX Software Test" C:\IT\WorkFolder\4\s\$(Agent.BuildDirectory) /collection:https://XXXXX.visualstudio.com/ /loginType:OAuth /login:.,*** /noprompt

##[command]tf vc get /version:2 /recursive /overwrite C:\IT\WorkFolder\4\s /loginType:OAuth /login:.,*** /noprompt
##[debug]Starting process:
##[debug]  File name: 'tf'
##[debug]  Arguments: 'vc get /version:2 /recursive /overwrite C:\IT\WorkFolder\4\s /loginType:OAuth /login:.,*** /noprompt'
##[debug]  Working directory: 'C:\IT\WorkFolder\4\s'
##[debug]  Require exit code zero: 'True'
##[debug]  Encoding web name: windows-1252 ; code page: '1252'
##[debug]  Force kill process on cancellation: 'False'
##[debug]  Redirected STDIN: 'False'
##[debug]  Persist current code page: 'False'
##[debug]  Keep redirected STDIN open: 'False'
##[debug]  High priority process: 'False'
##[debug]OOM score adjustment is Linux-only.
##[debug]Process started with process id 20656, waiting for process exit.
All files are up to date.
##[debug]STDOUT/STDERR stream read finished.
##[debug]STDOUT/STDERR stream read finished.
##[debug]Finished process 20656 with exit code 0, and elapsed time 00:00:01.9414527.
azure build azure-devops azure-pipelines agent
1个回答
0
投票

获取源日志说代码在'C:\ IT \ WorkFolder \ 4 \ s'中可用,但是您描述的构建步骤似乎尝试在c:\ it \ agent \ 3 \ s下构建解决方案,因此构建和获取源代码步骤不在同一目录中。

检查构建步骤,以确保您使用相同的路径变量。

您的构建步骤配置是什么样的?

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.