Skip to content

Commit

Permalink
fix: Allow workflowGraph for pipeline template versions model (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkyi authored Jul 26, 2024
1 parent 3eeae79 commit 6688840
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 3 additions & 1 deletion config/pipelineTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const Annotations = require('./annotations');
const Parameters = require('./parameters');
const Template = require('./template');
const Regex = require('./regex');
const WorkflowGraph = require('./workflowGraph');

const SCHEMA_CONFIG = Joi.object()
.keys({
Expand All @@ -15,7 +16,8 @@ const SCHEMA_CONFIG = Joi.object()
annotations: Annotations.annotations,
cache: BaseSchema.cache,
subscribe: BaseSchema.subscribe,
stages: BaseSchema.stages
stages: BaseSchema.stages,
workflowGraph: WorkflowGraph.workflowGraph
})
.unknown(false);

Expand Down
13 changes: 13 additions & 0 deletions test/data/pipelineTemplateVersions.get.allFields.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ config:
steps:
- init: npm install
- test: npm test
publish:
steps:
- publish: npm publish

shared:
environment:
Expand All @@ -18,5 +21,15 @@ config:
user:
value: sd-bot
description: User running build
workflowGraph:
nodes:
- name: ~commit
- name: main
- name: publish
edges:
- src: ~commit
dest: main
- src: main
dest: publish

createTime: "2038-01-19T03:14:08.131Z"

0 comments on commit 6688840

Please sign in to comment.