设置无代理作业的输出变量

Set an output variable from an agentless job

我有一个 运行 是 agentless job. This job produces a result that I would like to pass to the next or next job. The problem is that all the examples I've found set variables on agent jobs, not agentless. See here 的管道,所有示例都使用脚本命令,需要在代理上 运行。

有没有办法设置无代理作业的输出变量?我还能如何将无代理作业的结果传递给下一个作业?

不支持从无代理作业设置输出变量

powershell runs Windows PowerShell and will only work on a Windows agent.

https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/powershell?view=azure-devops

根据您的用例,您可以在工作中使用 dependsOncondition 来实现您的目标。例如。用于重试非幂等的构建。否则可能需要基于代理的配置。