Skip to content

Commit

Permalink
fix(3103): Add stages to config-parser schema for pipeline template (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tkyi committed May 1, 2024
1 parent 17db088 commit 8611862
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({})
})
Expand Down
15 changes: 13 additions & 2 deletions test/data/config.base.pipelineTemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -24,4 +24,15 @@ childPipelines:
scmUrls:
- git@github.com:org/repo.git
- https://github.com:org/repo2.git
startAll: true
startAll: true
stages:
canary:
jobs:
- first
- second
description: "Canary jobs for testing"
prod:
jobs:
- deploy-west
- deploy-east
description: "Prod deploy jobs"

0 comments on commit 8611862

Please sign in to comment.