我有一个使用组变量和特定代理池的 Azure Pipeline 模板,模板所在的存储库可以访问组变量和代理池,但当我尝试从另一个项目调用此模板时,我收到此错误消息:(授权资源没有任何作用)
There was a resource authorization issue: "The pipeline is not valid. Stage snapshot: Variable group creds could not be found. The variable group does not exist or has not been authorized for use. Could not find a pool with name agents_. The pool does not exist or has not been authorized for use. For authorization details, refer to https://aka.ms/yamlauthz."
有没有办法让模板像在原始存储库中一样运行,而不是从调用它的项目中运行?
当我尝试从同一项目中的另一个存储库调用模板时,我所要做的就是单击“授权资源”按钮,一切都很好,但我也尝试从同一组织和项目中的另一个项目运行它在另一个组织中但收到错误。
这就是我如何称呼我的模板:
resources:
repositories:
- repository: '<Repo Name>'
name: <Project Name>/<Repo Name>
type: git
ref: <Branch Name>
stages:
- template: <Pipeline file.yml>@<Repo Name>
parameters:
Action: Delete
HostIPs: <IPs>
SnapshotName: <Name>