Skip to content

Commit

Permalink
fix(MPTv2): Ensures v2 templates are marked correctly for preprocessi…
Browse files Browse the repository at this point in the history
  • Loading branch information
jtk54 authored Dec 20, 2018
1 parent e199df7 commit a39d7e1
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ class PipelineTemplatePreprocessor
// should be lifted to the top level like users will specify them.
//
// We also need to ensure that 'type' and 'schema' are set properly upstream when saving v2 template configs.
if (pipeline.getOrDefault(V2PipelineTemplate.SCHEMA, null) == V2PipelineTemplate.V2_SCHEMA_VERSION) {
if (pipeline.getOrDefault(V2PipelineTemplate.SCHEMA, null) == V2PipelineTemplate.V2_SCHEMA_VERSION &&
pipeline.get("template") != null) {
val templateConfig = HashMap(pipeline)
templateConfig.remove("trigger") // template configurations don't have a 'trigger' field.
pipeline.put("config", templateConfig)
pipeline.put("type", "templatedPipeline")
}


Expand Down

0 comments on commit a39d7e1

Please sign in to comment.