情况:
TFS 2018
构建过程包括两个阶段-分别在Windows和Linux代理上执行
[Get sources
(TFVC)将Clean
标志设置为false
问题:
Clean
标志-它总是执行tf workspace -delete
,... -new
等我已经添加了“打印变量”步骤,并且可以清楚地看到Build.Repository.Clean
在每个阶段都是false
。
有什么办法解决这个问题?
更多信息:
将system.debug
设置为true
会产生有趣的日志:
Querying workspace information.
##[debug]tf workspaces -format:xml "-collection:<tfs-server-url>" -jwt:******** -noprompt
##[debug]No workspace matching *;Project Collection Build Service (<collection-name>) on computer <computer-name> found in Team Foundation Server <tfs-server-url>.
##[debug]<?xml version="1.0" encoding="utf-8"?><workspaces/>
##[debug]Sources directory does not exist or is empty.
##[debug]tf workspaces ws_1_14 -computer:* -format:xml "-collection:<tfs-server-url>" -jwt:******** -noprompt
##[debug]No workspace matching ws_1_14;Project Collection Build Service (<collection-name>) on computer * found in Team Foundation Server <tfs-server-url>.
##[debug]Deleting: '/home/<user>/agent/_work/1/s'.
##[command]tf workspace -new -location:local -permission:Public ws_1_14 "-collection:<tfs-server-url>" -jwt:******** -noprompt
Workspace 'ws_1_14' created.
但是当我登录到该计算机并自己运行这些命令时(没有-jwt:... -noprompt
),我获得了有关ws_1_14
工作区的正确信息。代理程序正在作为通过sudo ./svc.sh install; sudo ./svc.sh start
创建的守护程序/服务执行。这意味着问题出在该守护程序的环境中。
hostname
是FQDN(而不是简称)。它是existing bug。