簡體   English   中英

使用自托管代理的 DevOps 中的 Bud Pipeline 問題

[英]Issue with Buld Pipeline in DevOps with Self Hosted Agent

我和我的團隊對此進行了深入研究,但我們無法弄清楚為什么我們在 Azure DevOps 管道中的構建不會將任何源代碼下載到運行構建的自托管代理。

我們有一個名為“ProjWindowsService”的項目,一個使用 Topshelf 的普通 .NET Windows 服務項目。

我們將源代碼簽入到 DevOps 中的 Repo,該項目在 Build Pipline 中映射,但是一旦代理運行構建作業,它就找不到源文件並給出錯誤:

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

基本上代理上的 c:\it\agent\4\s 下沒有任何東西(我們的理解是源文件應該復制到這個位置)除了 $tf 本身沒有文件。

所以錯誤消息非常有意義,但是我們已經選擇並嘗試了多種方式來配置 Build Pipline 的 Source 部分,但沒有任何成功。

構建 Pipline 源代碼非常感謝您在找出源代碼未下載到代理工作文件夾的原因方面的幫助。

獲取源日志:

##[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.

獲取源日志說代碼在 'C:\IT\WorkFolder\4\s' 中可用,但您描述的構建步驟似乎嘗試在 c:\it\agent\3\s 下構建解決方案,因此構建和獲取源步驟在同一目錄中不起作用。

檢查構建步驟以確保您使用相同的路徑變量。

您的構建步驟配置是什么樣的?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM