八达通输出变量可以以数组的形式进行缩放吗?

问题描述 投票:1回答:1

我正在使用Octopus满足所有先决条件的环境要求。在章鱼的其中一个步骤中,我希望动态设置一些使用章鱼输出变量的变量值。]

如果我想以数组的形式声明输出变量,则在要读取该变量的其他步骤中不会读取它的值。

下面是我使用过的一些代码片段(注意:这两个步骤都编写了嵌入式Powershell脚本代码):

    /*Step A code : Set output variable of step code*/
    $market= "RO"  /*Dynamically identify market depends on machine name */
    write-host $market
    Set-OctopusVariable -name "TestResult_Domain_['+%market%+']" -value 
    "DomainNameOfMachine"



    /*Another step code*/
    $market= "RO"  /*Dynamically identify market depends on machine name */
    write-host $market
    $filterDomain = "Octopus.Action[StepA].Output.TestResult_Domain_['$market']"

我正在使用Octopus满足所有先决条件的环境要求。在章鱼的其中一个步骤中,我希望动态设置一些可变值,为此我使用了章鱼输出...

octopus-deploy octopus
1个回答
0
投票

是的,您可以将数组存储为如下所示的变量值

© www.soinside.com 2019 - 2024. All rights reserved.