Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-05-31 21:08:16 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-31 21:08:16 +0300
commit7dd006b7ab8404228ebc78c0eb3fff7ca10d93f4 (patch)
tree31ac97961906b858d7e7b85e354f239d9abc0cf1 /app/assets/javascripts/editor
parenteb6b17504921dc3b8c22715b9ec7790a34b4abe0 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/editor')
-rw-r--r--app/assets/javascripts/editor/extensions/source_editor_ci_schema_ext.js12
-rw-r--r--app/assets/javascripts/editor/schema/ci.json78
2 files changed, 60 insertions, 30 deletions
diff --git a/app/assets/javascripts/editor/extensions/source_editor_ci_schema_ext.js b/app/assets/javascripts/editor/extensions/source_editor_ci_schema_ext.js
index b41eae88c54..b33dcba2b7d 100644
--- a/app/assets/javascripts/editor/extensions/source_editor_ci_schema_ext.js
+++ b/app/assets/javascripts/editor/extensions/source_editor_ci_schema_ext.js
@@ -17,10 +17,14 @@ export class CiSchemaExtension {
const absoluteSchemaUrl = new URL(ciSchemaPath, gon.gitlab_url).href;
const modelFileName = instance.getModel().uri.path.split('/').pop();
- registerSchema({
- uri: absoluteSchemaUrl,
- fileMatch: [modelFileName],
- });
+ registerSchema(
+ {
+ uri: absoluteSchemaUrl,
+ fileMatch: [modelFileName],
+ },
+ // eslint-disable-next-line @gitlab/require-i18n-strings
+ { customTags: ['!reference sequence'] },
+ );
},
};
}
diff --git a/app/assets/javascripts/editor/schema/ci.json b/app/assets/javascripts/editor/schema/ci.json
index 0a950cd1057..7ea1db0b5ad 100644
--- a/app/assets/javascripts/editor/schema/ci.json
+++ b/app/assets/javascripts/editor/schema/ci.json
@@ -15,6 +15,7 @@
"after_script": { "$ref": "#/definitions/after_script" },
"variables": { "$ref": "#/definitions/globalVariables" },
"cache": { "$ref": "#/definitions/cache" },
+ "!reference": {"$ref" : "#/definitions/!reference"},
"default": {
"type": "object",
"properties": {
@@ -27,7 +28,8 @@
"retry": { "$ref": "#/definitions/retry" },
"services": { "$ref": "#/definitions/services" },
"tags": { "$ref": "#/definitions/tags" },
- "timeout": { "$ref": "#/definitions/timeout" }
+ "timeout": { "$ref": "#/definitions/timeout" },
+ "!reference": {"$ref" : "#/definitions/!reference"}
},
"additionalProperties": false
},
@@ -341,6 +343,13 @@
}
]
},
+ "!reference": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "minLength": 1
+ }
+ },
"image": {
"oneOf": [
{
@@ -489,25 +498,39 @@
"type": "array",
"markdownDescription": "Rules allows for an array of individual rule objects to be evaluated in order, until one matches and dynamically provides attributes to the job. [Learn More](https://docs.gitlab.com/ee/ci/yaml/#rules).",
"items": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "if": { "$ref": "#/definitions/if" },
- "changes": { "$ref": "#/definitions/changes" },
- "exists": { "$ref": "#/definitions/exists" },
- "variables": { "$ref": "#/definitions/variables" },
- "when": { "$ref": "#/definitions/when" },
- "start_in": { "$ref": "#/definitions/start_in" },
- "allow_failure": { "$ref": "#/definitions/allow_failure" }
- }
+ "anyOf": [
+ {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "if": { "$ref": "#/definitions/if" },
+ "changes": { "$ref": "#/definitions/changes" },
+ "exists": { "$ref": "#/definitions/exists" },
+ "variables": { "$ref": "#/definitions/variables" },
+ "when": { "$ref": "#/definitions/when" },
+ "start_in": { "$ref": "#/definitions/start_in" },
+ "allow_failure": { "$ref": "#/definitions/allow_failure" }
+ }
+ },
+ {"type": "string", "minLength": 1},
+ {"type": "array", "minLength": 1, "items": { "type": "string" }}
+ ]
}
},
"globalVariables": {
"markdownDescription": "Defines environment variables globally. Job level property overrides global variables. If a job sets `variables: {}`, all global variables are turned off. You can use the value and description keywords to define variables that are prefilled when running a pipeline manually. [Learn More](https://docs.gitlab.com/ee/ci/yaml/#variables).",
- "type": "object",
+ "anyOf": [
+ {"type": "object"},
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ],
"additionalProperties": {
"anyOf": [
- {"type": ["string", "integer"]},
+ {"type": ["string", "integer", "array"]},
{
"type": "object",
"properties": {
@@ -540,11 +563,21 @@
}
},
"variables": {
- "type": "object",
"markdownDescription": "Defines environment variables for specific jobs. Job level property overrides global variables. If a job sets `variables: {}`, all global variables are turned off. [Learn More](https://docs.gitlab.com/ee/ci/yaml/#rulesvariables).",
- "additionalProperties": {
- "type": ["string", "integer"]
- }
+ "anyOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "type": ["string", "integer", "array"]
+ }
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
},
"timeout": {
"type": "string",
@@ -889,14 +922,7 @@
},
"job": {
"allOf": [
- { "$ref": "#/definitions/job_template" },
- {
- "anyOf": [
- { "required": ["script"] },
- { "required": ["extends"] },
- { "required": ["trigger"] }
- ]
- }
+ { "$ref": "#/definitions/job_template" }
]
},
"job_template": {