是否可以在 Azure Pipelines YAML 中定义具有依赖关系的资源
Is it possible to define resources with dependencies in Azure Pipelines YAML
是否可以创建依赖于另一个资源容器的资源容器并通过 YAML 定义该依赖项?所以类似于 depends_on
in docker compose 的内容。例如,kafka
依赖于 zookeper
,我想使用 kafka
作为服务容器,而不必手动 运行 zookeper 然后 运行 kafka,如果我将它定义为工作的 service
但是,截至目前,Azure DevOps 管道不支持 depends_on
。
相反,您可以使用 Volume。
Volumes are useful for sharing data between services, or for persisting data between multiple runs of a job.
You can specify volume mounts as an array of volumes. Volumes can either be named Docker volumes, anonymous Docker volumes, or bind mounts on the host.
事实证明,容器是按照它们定义的顺序创建的,因此通过在资源和服务节中的 kafka 之前指定 zookeper 就达到了目的。
是否可以创建依赖于另一个资源容器的资源容器并通过 YAML 定义该依赖项?所以类似于 depends_on
in docker compose 的内容。例如,kafka
依赖于 zookeper
,我想使用 kafka
作为服务容器,而不必手动 运行 zookeper 然后 运行 kafka,如果我将它定义为工作的 service
但是,截至目前,Azure DevOps 管道不支持 depends_on
。
相反,您可以使用 Volume。
Volumes are useful for sharing data between services, or for persisting data between multiple runs of a job.
You can specify volume mounts as an array of volumes. Volumes can either be named Docker volumes, anonymous Docker volumes, or bind mounts on the host.
事实证明,容器是按照它们定义的顺序创建的,因此通过在资源和服务节中的 kafka 之前指定 zookeper 就达到了目的。