Skip to content

Commit

Permalink
Update .drone.yml definition for workspace (SchemaStore#1767)
Browse files Browse the repository at this point in the history
* Add: test workspace.json

This does not pass the build process.
This is now fix in the schema

* Add: test pipeline_kubernetes_dns_config.json

This does not pass the build process.
This is now fix in the schema

* Add: test volumes.json

No issue found in the build process

* fix: "workspace" from array to object

* fix: "dns_config" from array to object

* change $ref to https://json.schemastore.org

from
https://kubernetesjsonschema.dev/master/_definitions.json
to
https://json.schemastore.org/kubernetes-definitions.json

* Add: kubernetes-definitions.json for local access

downloaded from
https://kubernetesjsonschema.dev/master/_definitions.json

* move drone.json from tv-4 to AJV validator
  • Loading branch information
GerryFerdinandus authored Jul 28, 2021
1 parent 1c04182 commit a34edb1
Show file tree
Hide file tree
Showing 6 changed files with 18,768 additions and 21 deletions.
14 changes: 12 additions & 2 deletions src/schema-validation.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"cryproj.dev.schema.json",
"cryproj.json",
"cloudify.json",
"drone.json",
"jdt.json",
"lsdlschema-0.7.json",
"lsdlschema-1.0.json",
Expand Down Expand Up @@ -59,7 +58,6 @@
"toolinfo.1.1.0.json",
"tslint.json",
"vega.json",
"---> below this line are for external schema that are downloaded via grunt-http. Can't be fix here.<---",
"jsonld.json",
"resume.json",
"swagger-2.0.json"
Expand All @@ -71,6 +69,7 @@
"missingcatalogurl": [
"---> below this line are schema, that are included from other schema<---",
"compilerdefaults.json",
"kubernetes-definitions.json",
"web-manifest.json",
"web-manifest-app-info.json",
"lsdlschema-0.7.json",
Expand Down Expand Up @@ -260,6 +259,17 @@
]
}
},
{
"drone.json": {
"unknownKeywords": [
"x-kubernetes-patch-strategy",
"x-kubernetes-patch-merge-key"
],
"externalSchema": [
"kubernetes-definitions.json"
]
}
},
{
"drush.site.yml.json": {
"unknownKeywords": [
Expand Down
31 changes: 12 additions & 19 deletions src/schemas/json/drone.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"title": "Drone CI configuration file",
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/drone.json",
"type": "object",
"required": [
"kind"
Expand Down Expand Up @@ -356,16 +357,11 @@
"$ref": "#/definitions/platform"
},
"workspace":{
"type": "array",
"items": {
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"$ref":"#/definitions/nonEmptyString"
}
"type": "object",
"required": ["path"],
"properties": {
"path": {
"$ref":"#/definitions/nonEmptyString"
}
}
},
Expand Down Expand Up @@ -442,33 +438,30 @@
"const": "kubernetes"
},
"metadata": {
"$ref": "https://kubernetesjsonschema.dev/master/_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"
"$ref": "https://json.schemastore.org/kubernetes-definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"
},
"tolerations": {
"description": "If specified, the pod's tolerations.",
"items": {
"$ref": "https://kubernetesjsonschema.dev/master/_definitions.json#/definitions/io.k8s.api.core.v1.Toleration"
"$ref": "https://json.schemastore.org/kubernetes-definitions.json#/definitions/io.k8s.api.core.v1.Toleration"
},
"type": "array"
},
"dns_config": {
"description": "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.",
"items": {
"$ref": "https://kubernetesjsonschema.dev/master/_definitions.json#/definitions/io.k8s.api.core.v1.PodDNSConfig"
},
"type": "array"
"$ref": "https://json.schemastore.org/kubernetes-definitions.json#/definitions/io.k8s.api.core.v1.PodDNSConfig"
},
"host_aliases": {
"description": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.",
"items": {
"$ref": "https://kubernetesjsonschema.dev/master/_definitions.json#/definitions/io.k8s.api.core.v1.HostAlias"
"$ref": "https://json.schemastore.org/kubernetes-definitions.json#/definitions/io.k8s.api.core.v1.HostAlias"
},
"type": "array"
},
"node_selector": {
"description": "A list of node selector terms.",
"items": {
"$ref": "https://kubernetesjsonschema.dev/master/_definitions.json#/definitions/io.k8s.api.core.v1.NodeSelectorTerm"
"$ref": "https://json.schemastore.org/kubernetes-definitions.json#/definitions/io.k8s.api.core.v1.NodeSelectorTerm"
},
"type": "array"
},
Expand Down Expand Up @@ -730,7 +723,7 @@
]
},
"resources": {
"$ref": "https://kubernetesjsonschema.dev/master/_definitions.json#/definitions/io.k8s.api.core.v1.ResourceRequirements"
"$ref": "https://json.schemastore.org/kubernetes-definitions.json#/definitions/io.k8s.api.core.v1.ResourceRequirements"
},
"volumes": {
"$ref": "#/definitions/steps_volumes"
Expand Down
Loading

0 comments on commit a34edb1

Please sign in to comment.