Power-Automate:Azure DevOps 连接器 - 当构建完成时触发输出“参数”始终为空

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

我正在为我的管道开发团队通知自动化。当构建成功完成时,我想将该管道的详细信息输出到我的团队频道。 AzureDevOps 连接器的每个所需输出都可以正常工作(BuildId、Url、SourceBranch,...),“参数”除外

Power Automate flow

触发此流程后,我会收到一条消息给我的团队聊天,如下所示

Teams Message

现在我正在使用一个基本的管道来回显参数“line”

Pipeline parameters

这是管道的运行情况

Run of the pipeline

我希望在我的团队聊天中看到管道的参数。 (我是否误解了这个名为“参数”的输出?)

azure-devops azure-pipelines devops power-automate
1个回答
0
投票

如果您检查 Power Automate 工作流程的

run history
,您会发现它
doesn't
包含
When a build completes
的管道参数。因此,您
cannot
会在下一个
Post message in a chat or channel
操作中获取参数。

When a build completes
之后,可以添加一个
HTTP action to azure devops
,得到构建结果,url如
https://dev.azure.com/{org}/{project}/_apis/build/builds/{buidid}?api-version=6.0
。您可以从之前的
{buildid}
操作中获得
When a build completes
。它在响应中包含模板参数
line
。然后你就可以在行动中使用它了
Post message in a chat or channel

© www.soinside.com 2019 - 2024. All rights reserved.