Skip to content

Commit

Permalink
feat:流水线变量语法支持两种风格 #10576
Browse files Browse the repository at this point in the history
  • Loading branch information
mingshewhe committed Sep 25, 2024
1 parent 4dadd44 commit b1e730e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,19 @@ object EnvReplacementParser {
): String {
if (value == null) return ""
// 先表达式替换
logger.info("EnvReplacementParser replace before:$value")
val newValue = ExprReplaceEnvVarUtil.replaceEnvVar(value, options)
logger.info("EnvReplacementParser replace after:$newValue")
// 如果支持${}替换,则需要使用旧版变量替换
return if (useSingleCurlyBraces) {
val result = if (useSingleCurlyBraces) {
ObjectReplaceEnvVarUtil.replaceEnvVar(newValue, options.contextMap)
} else {
newValue
}.let {
JsonUtil.toJson(it, false)
}
logger.info("EnvReplacementParser replace result:$result")
return result
}

fun getCustomExecutionContextByMap(
Expand Down

0 comments on commit b1e730e

Please sign in to comment.