在 Helm 升级步骤下迭代 Octopus 中变量的每个值 - 原始值 YAML

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

我在迭代变量值并替换下一行并生成输出时遇到问题。

来自章鱼文档:https://octopus.com/docs/projects/variables/variable-filters

Numbers:
#{each number in MyNumbers}
 - #{number}
#{/each}

Objects:
#{each item in MyObjects}
    #{item.Key}: #{item.Value.Price}
#{/each} 

八达通给出的变量:

USER_ENV:QA - 用 QA env 标记 USER_ENV:UAT - 用 UAT env 标记 CLIENTS_QA:CLIENTONE、CLIENTTWO、CLIENTTHREE

在 Raw Value YAML 下用 octopus 编写的 yaml:

    someConfig:
      #{each client in CLIENTS_QA | Split ','}
      #{USER_ENV}#{client}: yes
      #{/each}

我希望输出类似于: - 如果运行 QA

someConfig:
  QACLIENTONE: yes
  QACLIENTTWO: yes
  QACLIENTTHREE: yes

如何实现上述工作?我很确定它没有采用 -

中“客户”的值
#{each client in CLIENTS_QA | Split ','}
octopus-deploy
1个回答
0
投票

您可以加入八达通用户社区并在建议频道提出问题:https://join.slack.com/t/octopususergroup/shared_invite/zt-2mgbjzss0-sPoM316xX5F0T3WC9byAoQ

乔安娜

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