screwdriver-data-schema 22.9.11 → 22.9.13
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/regex.js +1 -1
- package/config/template.js +4 -1
- 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/regex.js
CHANGED
|
@@ -94,7 +94,7 @@ module.exports = {
|
|
|
94
94
|
/^(?:(?:https:\/\/(?:[^@/:\s]+@)?)|git@|org-\d+@)+([^/:\s]+)(?:\/|:)([^/:\s]+)\/([^\s]+?)(?:\.git)(#[^: \s]* [^: \s]*|#[^: \s]+)?(:[^: \s]* [^: \s]*|:[^: \s]+)?$/,
|
|
95
95
|
// scmUri. For example: github.com:abc-123:master or bitbucket.org:{123}:master
|
|
96
96
|
// Optionally, can have rootDir. For example: github.com:abc-123:master:src/app/component
|
|
97
|
-
SCM_URI: /^([^:]+):([^:]+):([^:]+)(?::(
|
|
97
|
+
SCM_URI: /^([^:]+):([^:]+):([^:]+)(?::(.*))?$/,
|
|
98
98
|
// SCM context. For example: github:github.com, gitlab:gitlab.mycompany.com
|
|
99
99
|
// First group: SCM plugin name (e.g. github)
|
|
100
100
|
// Second group: SCM host name (e.g. github.com)
|
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
|
/**
|