我在迭代变量值并替换下一行并生成输出时遇到问题。
来自章鱼文档: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 ','}
您可以加入八达通用户社区并在建议频道提出问题:https://join.slack.com/t/octopususergroup/shared_invite/zt-2mgbjzss0-sPoM316xX5F0T3WC9byAoQ
乔安娜