【发布时间】:2020-05-06 03:42:55
【问题描述】:
我在项目的 Azure Repos 部分中的 Dockerfile 中设置了环境变量。我必须在 Azure Pipeline 中设置基于 Docker 的管道。我正在尝试在azure-pipelines.yaml 文件中获取环境变量内容。
是否可以访问azure-pipelines.yaml 文件中的Dockerfile 内容?
我们可以将参数值(环境值)传递给azure-pipelines.yaml 文件吗?
请指导!
【问题讨论】:
-
@LinPy 谢谢!是否可以在
azure-pipelines.yaml文件之外传递值?在创建azure-pipelines.yaml文件时传递值运行时。 -
在Docker task 中有一个属性
Dockerfile,它允许您使用文件路径访问docker 文件。另请查看Is there a way to read file from Azure DevOps YAML?,了解有关如何在 Azure DevOps 中读取文件内容的信息。
标签: azure docker azure-devops dockerfile azure-pipelines