本文介绍了在Azure DevOps Server 2019(本地)发布管道中,一个阶段如何将文件传递到另一阶段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们具有Azure DevOps Server 2019本地版本.这意味着没有统一的管道,也没有针对发布管道的YAML.

We have Azure DevOps Server 2019 on-prem. That means no unified pipelines, no YAML for release pipeline.

方案是这样的:阶段运行terraform代码以在Azure中置备一些资源.必须在terraform planterraform apply之间插入手动批准,但是,由terraform plan阶段生成的计划文件必须与terraform apply阶段共享.

The scenario is this:A stage runs terraform code to provision some resources in Azure. It is necessary to insert manual approval between terraform plan and terraform apply, however, the plan file produced by terraform plan stage must be shared with the terraform apply stage.

我可以看到以下选项:

  1. 将计划文件保存在共享文件系统中
  2. 将计划文件保存在Azure上的专用存储中
  3. 将计划文件保存在Azure DevOps中的某个位置,以便阶段可以访问它而无需定义专用文件共享或Azure存储
  4. 将计划文件的内容作为输出变量传递

我个人最喜欢最后一个选项,但我想知道输出变量值长度的限制是什么? Azure中变量的最大长度是多少管道?建议它大约为32KB,可能不够好.有鉴于此,是否可以选择在阶段之间传递文件?

I, personally, like the most the last option, but I wonder what are the limitations on the output variable value length? What is the maximum length of a variable in Azure Pipelines? suggests it is around 32KB, which may not be good enough. Given that, is there an option to pass files between stages?

推荐答案

经典发行版本中没有默认任务.由于变量的限制,您需要将文件发布到专用文件共享或Azure存储中.

There is no default task you can use in classic release pipeline. Due to the limitation of a variable, you would need to publish the file to dedicated file share or Azure storage.

这篇关于在Azure DevOps Server 2019(本地)发布管道中,一个阶段如何将文件传递到另一阶段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 13:20