From 50ee7b03f1a70b736f80f4f9b1c5df7314554c5f Mon Sep 17 00:00:00 2001 From: Tiffany K Date: Tue, 30 Apr 2024 16:19:23 -0700 Subject: [PATCH] fix(3103): Add stages to config-parser schema for pipeline template --- config/base.js | 2 +- test/data/config.base.pipelineTemplate.yaml | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) 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"