Commit 2f4d7ea7 authored by Brandon Labuschagne's avatar Brandon Labuschagne

Merge branch 'add-ci-schema-keywords' into 'master'

Add missing keywords to CI schema

See merge request gitlab-org/gitlab!70779
parents b9e2228c f1d0f6ed
...@@ -277,7 +277,8 @@ ...@@ -277,7 +277,8 @@
"type": "string", "type": "string",
"format": "uri-reference", "format": "uri-reference",
"pattern": "\\.ya?ml$" "pattern": "\\.ya?ml$"
} },
"rules": { "$ref": "#/definitions/rules" }
}, },
"required": ["local"] "required": ["local"]
}, },
...@@ -491,7 +492,7 @@ ...@@ -491,7 +492,7 @@
}, },
"rules": { "rules": {
"type": "array", "type": "array",
"description": "rules allows for an array of individual rule objects to be evaluated in order, until one matches and dynamically provides attributes to the job.", "description": "Rules allows for an array of individual rule objects to be evaluated in order, until one matches and dynamically provides attributes to the job.",
"items": { "items": {
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
...@@ -625,17 +626,26 @@ ...@@ -625,17 +626,26 @@
] ]
}, },
"cache": { "cache": {
"oneOf": [ "properties": {
{ "when": {
"$ref": "#/definitions/cache_entry" "description": "Defines when to save the cache, based on the status of the job.",
}, "default": "on_success",
{ "oneOf": [
"type": "array", {
"items": { "enum": ["on_success"],
"$ref": "#/definitions/cache_entry" "description": "Save the cache only when the job succeeds."
} },
{
"enum": ["on_failure"],
"description": "Save the cache only when the job fails. "
},
{
"enum": ["always"],
"description": "Always save the cache. "
}
]
} }
] }
}, },
"cache_entry": { "cache_entry": {
"type": "object", "type": "object",
...@@ -1320,6 +1330,29 @@ ...@@ -1320,6 +1330,29 @@
} }
}, },
"required": ["artifact", "job"] "required": ["artifact", "job"]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"project": {
"description": "Path to another private project under the same GitLab instance, like `group/project` or `group/sub-group/project`.",
"type": "string",
"pattern": "\\S/\\S"
},
"ref": {
"description": "Branch/Tag/Commit hash for the target project.",
"minLength": 1,
"type": "string"
},
"file": {
"description": "Relative path from repository root (`/`) to the pipeline configuration YAML file.",
"type": "string",
"format": "uri-reference",
"pattern": "\\.ya?ml$"
}
},
"required": ["project", "file"]
} }
] ]
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment