diff --git a/orca-pipelinetemplate/src/main/java/com/netflix/spinnaker/orca/pipelinetemplate/v1schema/render/YamlRenderedValueConverter.java b/orca-pipelinetemplate/src/main/java/com/netflix/spinnaker/orca/pipelinetemplate/v1schema/render/YamlRenderedValueConverter.java index bd966ce047..0d72a7c432 100644 --- a/orca-pipelinetemplate/src/main/java/com/netflix/spinnaker/orca/pipelinetemplate/v1schema/render/YamlRenderedValueConverter.java +++ b/orca-pipelinetemplate/src/main/java/com/netflix/spinnaker/orca/pipelinetemplate/v1schema/render/YamlRenderedValueConverter.java @@ -42,6 +42,9 @@ public Object convertRenderedValue(String renderedValue) { if (containsEL(renderedValue) || isYamlKeyword(renderedValue)) { return renderedValue; } + if (containsNoExpandMarker(renderedValue)) { + return trimNoExpandMarker(renderedValue); + } try { Object converted = yaml.load(renderedValue); @@ -67,4 +70,12 @@ private static boolean containsEL(String renderedValue) { private static boolean isYamlKeyword(String renderedValue) { return YAML_KEYWORDS.contains(renderedValue.toLowerCase()); } + + private static boolean containsNoExpandMarker(String renderedValue) { + return renderedValue.startsWith("noexpand:"); + } + + private static String trimNoExpandMarker(String renderedValue) { + return renderedValue.substring("noexpand:".length(), renderedValue.length()); + } } diff --git a/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/v1schema/render/JinjaRendererSpec.groovy b/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/v1schema/render/JinjaRendererSpec.groovy index 804427c7ce..de4dcc72cb 100644 --- a/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/v1schema/render/JinjaRendererSpec.groovy +++ b/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/v1schema/render/JinjaRendererSpec.groovy @@ -87,6 +87,7 @@ class JinjaRendererSpec extends Specification { '${ #stage("First Wait")["status"].toString() == "SUCCESS" }' || String | '${ #stage("First Wait")["status"].toString() == "SUCCESS" }' '${ parameters.CONFIG_FOLDER ?: \'\' }' || String | '${ parameters.CONFIG_FOLDER ?: \'\' }' '' || String | null + 'noexpand:{"t": "deployment"}' || String | '{"t": "deployment"}' }