作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在 Azure Pipelines YAML 中,您可以指定作业运行的环境。
jobs:
- deployment: Deploy
displayName: Deploy
environment: $(environment)
将新值传递给管道应该会自动在 DevOps 中创建环境。
但是,我最近在尝试部署到新环境时遇到此错误:
Job Deploy: Environment [environment-name] could not be found. The environment does not exist or has not been authorized for use.
我手动创建环境后,管道部署成功。
是否有任何配置或我遗漏的东西允许自动创建环境?
最佳答案
我有同样的问题,根据文档,不可能以这种方式创建环境。
If you are using runtime parameters for creating the environment, it will fail as these parameters are expanded at run time. Environment creation happens at compile time, so we have to use variables to create the environment.
更多信息请查看here .
关于azure-pipelines - 为什么 Azure Pipelines 说 "The environment does not exist or has not been authorized for use"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69546506/
我是一名优秀的程序员,十分优秀!