azure - 无法在 Azure Pipelines 中授权变量组

标签 azure azure-devops azure-pipelines

我正在 Azure DevOps 中构建多阶段 Azure Pipeline 来构建和发布我的产品。

我想在此管道中使用变量组,以便我可以为不同的部署环境替换不同的配置值。

我无法授权管道使用我的变量组。 当我手动运行构建时,我在摘要页面上看到一条消息,告诉我变量组未获得授权: Error message

Azure DevOps documentation说这是可以预料的:

When you make changes to the YAML file and add additional resources (assuming that these not authorized for use in all pipelines as explained above), then the build fails with a resource authorization error that is similar to the following: Could not find a {RESOURCE} with name {NAME}. The {RESOURCE} does not exist or has not been authorized for use.

In this case, on the Summary page, you will see an option to authorize the resources on the failed build. If you are a member of the User role for the resource, you can select this option. Once the resources are authorized, you can start a new build.

我是变量组的用户角色的成员,我看到了该消息,但没有提供授权选项。我还需要做些什么吗?或者是否有其他方法可以授权特定管道使用变量组?

最佳答案

@hey 提出的解决方案对我不起作用,因为我必须使用部署作业。我找到了解决此错误的一种巧妙方法:

  1. 转到您的管道
  2. 编辑
  3. 点击树点 > 触发器
  4. 导航到变量选项卡
  5. 变量组
  6. 添加变量组

关于azure - 无法在 Azure Pipelines 中授权变量组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58313864/

相关文章:

Azure keyvault CLI - 如何在值中包含空格

azure - 适用于 Jenkins 的 Azure DevOps 和 Team Foundation Server 插件中的发布定义

azure - 如何将 2 个团队集合从 tfs 迁移到 azure devops 服务中的一个组织?

Azure DevOps Pipeline 任务失败但仍显示绿色(成功)

asp.net-mvc - Azure 网站和 ASP.NET,应用程序池被回收之前有多少不活动状态导致重新编译?

azure - 在 Azure WebApp 中使用环境变量引用时如何解析 secret

azure - 显示从 azure devops 进行二头肌部署期间的错误原因

azure-devops - Azure devops管道条件名称

azure - 一旦失败的测试百分比高于阈值,如何使 Azure DevOps 中的管道运行失败

azure - 将新版本发布到 Azure 应用程序/服务的最佳方式?