diff --git a/config/base.js b/config/base.js index 71ea960a..4966c847 100644 --- a/config/base.js +++ b/config/base.js @@ -80,7 +80,7 @@ const SCHEMA_CONFIG_PRE_TEMPLATE_MERGE = Joi.object() }), cache: SCHEMA_CACHE, childPipelines: SCHEMA_CHILD_PIPELINES, - stages: SCHEMA_STAGES.when('template', { is: Joi.exist(), then: Joi.forbidden() }), + stages: SCHEMA_STAGES, subscribe: SCHEMA_SUBSCRIBE, parameters: Parameters.parameters.default({}) }) diff --git a/test/data/config.base.pipelineTemplate.yaml b/test/data/config.base.pipelineTemplate.yaml index 679dc60a..9da863a6 100644 --- a/test/data/config.base.pipelineTemplate.yaml +++ b/test/data/config.base.pipelineTemplate.yaml @@ -12,7 +12,7 @@ cache: build: ["target/some-artifact.zip"] publish-preview: ["target/some-artifact.zip"] test: [] -subscribe: +subscribe: scmUrls: - git@github.com:foo/bar.git#master: [~commit, ~tags, ~release] annotations: @@ -24,4 +24,15 @@ childPipelines: scmUrls: - git@github.com:org/repo.git - https://github.com:org/repo2.git - startAll: true \ No newline at end of file + startAll: true +stages: + canary: + jobs: + - first + - second + description: "Canary jobs for testing" + prod: + jobs: + - deploy-west + - deploy-east + description: "Prod deploy jobs"