screwdriver-data-schema 22.9.12 → 22.9.14
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/command.js +4 -1
- package/config/template.js +4 -1
- package/models/stage.js +2 -6
- package/package.json +1 -1
package/config/command.js
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
const Joi = require('joi');
|
|
4
4
|
const Regex = require('./regex');
|
|
5
5
|
const CommandFormat = require('./commandFormat');
|
|
6
|
+
const Compatibilities = require('./compatibilities');
|
|
7
|
+
const { compatibilities } = Compatibilities;
|
|
6
8
|
|
|
7
9
|
const COMMAND_NAMESPACE = Joi.string()
|
|
8
10
|
.regex(Regex.COMMAND_NAMESPACE)
|
|
@@ -56,7 +58,8 @@ const SCHEMA_COMMAND = Joi.object()
|
|
|
56
58
|
format: COMMAND_FORMAT.required(),
|
|
57
59
|
habitat: CommandFormat.habitat.when('format', { is: 'habitat', then: Joi.required() }),
|
|
58
60
|
docker: CommandFormat.docker.when('format', { is: 'docker', then: Joi.required() }),
|
|
59
|
-
binary: CommandFormat.binary.when('format', { is: 'binary', then: Joi.required() })
|
|
61
|
+
binary: CommandFormat.binary.when('format', { is: 'binary', then: Joi.required() }),
|
|
62
|
+
compatibilities
|
|
60
63
|
})
|
|
61
64
|
// any one of them
|
|
62
65
|
.or('habitat', 'docker', 'binary')
|
package/config/template.js
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
const Joi = require('joi');
|
|
4
4
|
const Job = require('./job');
|
|
5
5
|
const Regex = require('./regex');
|
|
6
|
+
const Compatibilities = require('./compatibilities');
|
|
7
|
+
const { compatibilities } = Compatibilities;
|
|
6
8
|
|
|
7
9
|
const TEMPLATE_NAMESPACE = Joi.string()
|
|
8
10
|
.regex(Regex.TEMPLATE_NAMESPACE)
|
|
@@ -70,7 +72,8 @@ const SCHEMA_TEMPLATE = Joi.object().keys({
|
|
|
70
72
|
description: TEMPLATE_DESCRIPTION.required(),
|
|
71
73
|
maintainer: TEMPLATE_MAINTAINER.required(),
|
|
72
74
|
config: Job.templateJob.required().or('image', 'template').or('steps', 'template'),
|
|
73
|
-
images: TEMPLATE_IMAGES
|
|
75
|
+
images: TEMPLATE_IMAGES,
|
|
76
|
+
compatibilities
|
|
74
77
|
});
|
|
75
78
|
|
|
76
79
|
/**
|
package/models/stage.js
CHANGED
|
@@ -11,13 +11,9 @@ const MODEL = {
|
|
|
11
11
|
|
|
12
12
|
name: Joi.string().regex(Regex.STAGE_NAME).max(110).description('Name of the Stage').example('deploy'),
|
|
13
13
|
|
|
14
|
-
setup: Joi.
|
|
15
|
-
.items(Joi.number().integer().positive().description('Identifier for this job').example(123345))
|
|
16
|
-
.description('Job IDs in this Stage'),
|
|
14
|
+
setup: Joi.number().integer().positive().description('Job ID for Stage setup').example(123345),
|
|
17
15
|
|
|
18
|
-
teardown: Joi.
|
|
19
|
-
.items(Joi.number().integer().positive().description('Identifier for this job').example(123345))
|
|
20
|
-
.description('Job IDs in this Stage'),
|
|
16
|
+
teardown: Joi.number().integer().positive().description('Job ID for Stage teardown').example(123345),
|
|
21
17
|
|
|
22
18
|
jobIds: Joi.array()
|
|
23
19
|
.items(Joi.number().integer().positive().description('Identifier for this job').example(123345))
|