Azure Pipeline 作业脚本 /usr/bin/xvfb-run: cannot create /dev/stdout: No such device or address

时间:2021-06-06 19:33:50

标签: azure unity3d azure-devops xvfb

我使用 https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/docker?view=azure-devops 在我的 kubernetes 集群中创建了一个 Azure 代理。我可以在其上运行 hello-world 样式的管道,代理已启动并正在运行。我使用 unityci/editor:ubuntu-2021.1.10f1-webgl-0.13.0 安装了带有手动许可证文件的 unity-editor。

尝试通过执行到 pod 来预先运行脚本:

unity-editor -nographics -batchmode -quit -manualLicenseFile /path/to/license-file

这工作正常...

现在有了 Azure Pipeline:

steps:
- script: unity-editor -nographics -batchmode -quit -manualLicenseFile /path/to/license-file
  displayName: 'Validate unity installation'

我收到以下错误:

==============================================================================
Generating script.
Script contents:
unity-editor -nographics -batchmode -quit -manualLicenseFile /path/to/license-file
========================== Starting Command Output ===========================
/bin/bash --noprofile --norc /azp/_work/_temp/bad98430-5af6-47b2-a280-353adbf033c9.sh
/usr/bin/xvfb-run: 159: /usr/bin/xvfb-run: cannot create /dev/stdout: No such device or address
/usr/bin/xvfb-run: 83: /usr/bin/xvfb-run: cannot create /dev/stdout: No such device or address
##[error]Bash exited with code '2'.

我怀疑存在某种权限错误,但该作业正在 root 下运行(由返回 root 的 whoami 管道步骤验证)

然后我尝试运行作业正在运行的完全相同的行

echo "unity-editor -nographics -batchmode -quit -manualLicenseFile /path/to/license-file" > tmp.sh
chmod +x tmp.sh
/bin/bash --noprofile --norc ./tmp.sh

又一次……效果很好。

Azure Pipeline 缺少什么?

0 个答案:

没有答案