screwdriver-data-schema 23.0.4 → 23.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/base.js +5 -5
- package/config/pipelineTemplate.js +8 -5
- package/config/workflowGraph.js +5 -1
- package/package.json +1 -1
package/config/base.js
CHANGED
|
@@ -67,7 +67,7 @@ const SCHEMA_CONFIG_PRE_TEMPLATE_MERGE = Joi.object()
|
|
|
67
67
|
.keys({
|
|
68
68
|
template: Joi.string().regex(Regex.FULL_TEMPLATE_NAME_WITH_NAMESPACE),
|
|
69
69
|
version: Joi.number().integer().min(1).max(50),
|
|
70
|
-
annotations: Annotations.annotations
|
|
70
|
+
annotations: Annotations.annotations,
|
|
71
71
|
jobs: SCHEMA_JOBS.when('template', { is: Joi.exist(), then: Joi.forbidden(), otherwise: Joi.required() }),
|
|
72
72
|
shared: Joi.when('template', {
|
|
73
73
|
is: Joi.exist(),
|
|
@@ -78,11 +78,11 @@ const SCHEMA_CONFIG_PRE_TEMPLATE_MERGE = Joi.object()
|
|
|
78
78
|
}),
|
|
79
79
|
otherwise: SCHEMA_SHARED
|
|
80
80
|
}),
|
|
81
|
-
cache: SCHEMA_CACHE
|
|
82
|
-
childPipelines: SCHEMA_CHILD_PIPELINES
|
|
81
|
+
cache: SCHEMA_CACHE,
|
|
82
|
+
childPipelines: SCHEMA_CHILD_PIPELINES,
|
|
83
83
|
stages: SCHEMA_STAGES.when('template', { is: Joi.exist(), then: Joi.forbidden() }),
|
|
84
|
-
subscribe: SCHEMA_SUBSCRIBE
|
|
85
|
-
parameters: Parameters.parameters.default({})
|
|
84
|
+
subscribe: SCHEMA_SUBSCRIBE,
|
|
85
|
+
parameters: Parameters.parameters.default({})
|
|
86
86
|
})
|
|
87
87
|
.unknown(false);
|
|
88
88
|
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const Joi = require('joi');
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const BaseSchema = require('./base');
|
|
5
|
+
const Annotations = require('./annotations');
|
|
6
6
|
const Parameters = require('./parameters');
|
|
7
7
|
const Template = require('./template');
|
|
8
8
|
const Regex = require('./regex');
|
|
9
9
|
|
|
10
10
|
const SCHEMA_CONFIG = Joi.object()
|
|
11
11
|
.keys({
|
|
12
|
-
jobs:
|
|
13
|
-
shared:
|
|
14
|
-
parameters: Parameters.parameters.default({})
|
|
12
|
+
jobs: BaseSchema.jobs.required(),
|
|
13
|
+
shared: BaseSchema.shared,
|
|
14
|
+
parameters: Parameters.parameters.default({}),
|
|
15
|
+
annotations: Annotations.annotations,
|
|
16
|
+
cache: BaseSchema.cache,
|
|
17
|
+
subscribe: BaseSchema.subscribe
|
|
15
18
|
})
|
|
16
19
|
.unknown(false);
|
|
17
20
|
|
package/config/workflowGraph.js
CHANGED
|
@@ -7,7 +7,11 @@ const SCHEMA_WORKFLOW_GRAPH = Joi.object().keys({
|
|
|
7
7
|
nodes: Joi.array().items(
|
|
8
8
|
Joi.object()
|
|
9
9
|
.keys({
|
|
10
|
-
name: requiresValue
|
|
10
|
+
name: requiresValue,
|
|
11
|
+
virtual: Joi.boolean()
|
|
12
|
+
.description('Flag to indicate if the node is a virtual job')
|
|
13
|
+
.example(true)
|
|
14
|
+
.optional()
|
|
11
15
|
})
|
|
12
16
|
.unknown()
|
|
13
17
|
),
|