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
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-06-14 03:08:10 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-14 03:08:10 +0300
commitc77ea1f6860ba657eefd5a06e46db8d212b21f08 (patch)
tree9330894c4c318e04a71f38ce85c82d3a23192fcb /app
parent04cc87ee46c1c0b6b4eb7df964b3115dd2578877 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/editor/schema/ci.json62
-rw-r--r--app/models/organizations/organization.rb4
2 files changed, 65 insertions, 1 deletions
diff --git a/app/assets/javascripts/editor/schema/ci.json b/app/assets/javascripts/editor/schema/ci.json
index 82a8cfaa3eb..8e307bc1f19 100644
--- a/app/assets/javascripts/editor/schema/ci.json
+++ b/app/assets/javascripts/editor/schema/ci.json
@@ -359,7 +359,7 @@
"pattern": "\\.ya?ml$"
},
"rules": {
- "$ref": "#/definitions/rules"
+ "$ref": "#/definitions/includeRules"
},
"inputs": {
"$ref": "#/definitions/inputs"
@@ -399,6 +399,9 @@
}
]
},
+ "rules": {
+ "$ref": "#/definitions/includeRules"
+ },
"inputs": {
"$ref": "#/definitions/inputs"
}
@@ -418,6 +421,9 @@
"format": "uri-reference",
"pattern": "\\.ya?ml$"
},
+ "rules": {
+ "$ref": "#/definitions/includeRules"
+ },
"inputs": {
"$ref": "#/definitions/inputs"
}
@@ -435,6 +441,9 @@
"type": "string",
"format": "uri-reference"
},
+ "rules": {
+ "$ref": "#/definitions/includeRules"
+ },
"inputs": {
"$ref": "#/definitions/inputs"
}
@@ -453,6 +462,9 @@
"format": "uri-reference",
"pattern": "^https?://.+\\.ya?ml$"
},
+ "rules": {
+ "$ref": "#/definitions/includeRules"
+ },
"inputs": {
"$ref": "#/definitions/inputs"
}
@@ -794,6 +806,54 @@
]
}
},
+ "includeRules": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "markdownDescription": "You can use rules to conditionally include other configuration files. [Learn More](https://docs.gitlab.com/ee/ci/yaml/includes.html#use-rules-with-include).",
+ "items": {
+ "anyOf": [
+ {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "if": {
+ "$ref": "#/definitions/if"
+ },
+ "exists": {
+ "$ref": "#/definitions/exists"
+ },
+ "when": {
+ "markdownDescription": "Use `when: never` to exclude the configuration file if the condition matches. [Learn More](https://docs.gitlab.com/ee/ci/yaml/includes.html#include-with-rulesif).",
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "never"
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "type": "string",
+ "minLength": 1
+ },
+ {
+ "type": "array",
+ "minLength": 1,
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ }
+ },
"workflowName": {
"type": "string",
"markdownDescription": "Defines the pipeline name. [Learn More](https://docs.gitlab.com/ee/ci/yaml/#workflowname).",
diff --git a/app/models/organizations/organization.rb b/app/models/organizations/organization.rb
index adaa022bef4..ce89f57a73b 100644
--- a/app/models/organizations/organization.rb
+++ b/app/models/organizations/organization.rb
@@ -17,6 +17,10 @@ module Organizations
'organizations/path': true,
length: { minimum: 2, maximum: 255 }
+ def self.default_organization
+ find_by(id: DEFAULT_ORGANIZATION_ID)
+ end
+
def default?
id == DEFAULT_ORGANIZATION_ID
end