TFS linux代理忽略Build.Repository.Clean变量

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

情况:

  • TFS 2018

  • 构建过程包括两个阶段-分别在Windows和Linux代理上执行

  • [Get sources(TFVC)将Clean标志设置为false

问题:

  • [Linux代理(与代理不同,它忽略)忽略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创建的守护程序/服务执行。这意味着问题出在该守护程序的环境中。

tfs azure-devops tfsbuild
1个回答
0
投票
这是因为我的hostname是FQDN(而不是简称)。它是existing bug
© www.soinside.com 2019 - 2024. All rights reserved.