0

我正在使用 Azure DevOps (visualstudio.com) 并尝试在本地服务器上启动并运行 Linux 构建代理。这以前可以工作,但我将 Linux 服务器从 Ubuntu 16.04 升级到 18.04。这打破了我以前的构建代理。

所以我删除了以前的构建代理并安装了一个最新的。新的很容易注册,但是当我尝试运行构建时,它无法检查源。

有谁知道什么可能导致这个问题,或者我可以去哪里寻求帮助?我不管理我们的 Azure DevOps。我只是想让 Linux 部分按原样工作。

编辑:我应该注意运行 ./externals/tee/tf 产生零输出(并返回相同的 100 代码)。也许它与java有关。我正在运行 Java(TM) SE 运行时环境(构建 12.0.2+10)。

##[debug]Evaluating condition for step: 'Checkout'
##[debug]Evaluating: SucceededNode()
##[debug]Evaluating SucceededNode:
##[debug]=> True
##[debug]Result: True
##[section]Starting: Checkout
==============================================================================
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
##[debug]Processed: ##vso[plugininternal.updaterepositorypath alias=__designer_repo;]/home/***/myagent/_work/1/s
##[debug]Repository requires to be placed at '/home/***/myagent/_work/1/s', current location is '/home/***/myagent/_work/1/s'
Prepending PATH environment variable with directory containing 'tf'.
##[debug]Processed: ##vso[task.prependpath]/home/***/myagent/externals/tee
##[debug]PATH: '/home/***/myagent/externals/tee:/home/***/bin:/home/***/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'
Querying workspace information.
##[debug]tf workspaces -format:xml "-collection:https://mydomain.visualstudio.com/" -jwt:*** -noprompt
##[debug]Starting process:
##[debug]  File name: 'tf'
##[debug]  Arguments: 'workspaces -format:xml "-collection:https://mydomain.visualstudio.com/" -jwt:*** -noprompt'
##[debug]  Working directory: '/home/***/myagent/_work/1/s'
##[debug]  Require exit code zero: 'True'
##[debug]  Encoding web name:  ; code page: ''
##[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]Updated oom_score_adj to 500 for PID: 1921.
##[debug]Process started with process id 1921, waiting for process exit.
##[debug]STDOUT/STDERR stream read finished.
##[debug]STDOUT/STDERR stream read finished.
##[debug]Finished process 1921 with exit code 100, and elapsed time 00:00:03.3458546.
##[error]Exit code 100 returned from process: file name 'tf', arguments 'workspaces -format:xml "-collection:https://mydomain.visualstudio.com/" -jwt:*** -noprompt'.
##[debug]Processed: ##vso[task.logissue type=error;]Exit code 100 returned from process: file name 'tf', arguments 'workspaces -format:xml "-collection:https://mydomain.visualstudio.com/" -jwt:*** -noprompt'.
##[debug]Processed: ##vso[task.complete result=Failed;]
##[debug]   at Agent.Plugins.Repository.TeeCliManager.WorkspacesAsync(Boolean matchWorkspaceNameOnAnyComputer)
   at Agent.Plugins.Repository.TfsVCSourceProvider.GetSourceAsync(AgentTaskPluginExecutionContext executionContext, RepositoryResource repository, CancellationToken cancellationToken)
   at Agent.Plugins.Repository.CheckoutTask.RunAsync(AgentTaskPluginExecutionContext executionContext, CancellationToken token)
   at Agent.PluginHost.Program.Main(String[] args)
##[section]Finishing: Checkout
4

1 回答 1

1

当我看到 tf 命令没有输出时,我很确定这一定是 java 的问题。我尝试了许多不同版本的java,但都没有工作。但是使用 Oracle java 1.8.0_221 它终于奏效了。

我下载了 .tar.gz 文件,将其解压缩,并覆盖 /usr/bin/java* 符号链接以指向 1.8 副本,然后它就可以工作了。

于 2019-08-06T19:55:51.403 回答