如何在发布管道中使用输出变量 [英] How to use Output Variables in Release pipeline

查看:97
本文介绍了如何在发布管道中使用输出变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在所有有关输出变量的文档中搜索了构建管道,并且只告诉我如何在.yaml中进行设置.但是如何在发布管道中使用它呢?

I searched all the docs about Output Variables are for build pipeline and only told me how to set in .yaml. But how to use it in release pipeline?

假设我在登录"步骤中有2个变量$ abc ="123" $ def ="456".如何在下面的文本框中设置它们?以及如何在部署"步骤中使用它们?

Supposed I have 2 variables $abc="123" $def="456" in step Login. How to set them in below text box? and How to use them in step Deploy?

推荐答案

一些任务定义了输出变量

Some tasks define output variables

对于简短的文本,它表示以下脚本:

For brief text, it represents the follow scripts:

echo "##vso[task.setvariable variable=abc;isOutput=true]123"

只需在任务的空白处指定引用名称,然后就可以使用以下格式调用此输出变量abc:.

Just specify the reference name in the blank of task, and then, you can call this output variable abc by using the format: <reference name>.<variable name>.

例如,如果您将引用名称指定为mycustom,则只需使用$(mycustom.abc)调用输出变量.

For example, if you specify the reference name as mycustom, just call the output variable by using $(mycustom.abc).

这篇关于如何在发布管道中使用输出变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆