Provisioning: Return available repository types in settings endpoint (#107977)
* Add types for other repositories * Inject the types from extras * Fix go-lint * Fix typecheck * Add it to the tests --------- Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
This commit is contained in:
committed by
GitHub
parent
eab8c1db07
commit
b49b103f42
@@ -2572,6 +2572,37 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"com.github.grafana.grafana.pkg.apis.provisioning.v0alpha1.BitbucketRepositoryConfig": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"branch"
|
||||
],
|
||||
"properties": {
|
||||
"branch": {
|
||||
"description": "The branch to use in the repository.",
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"encryptedToken": {
|
||||
"description": "Token for accessing the repository, but encrypted. This is not possible to read back to a user decrypted.",
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"x-kubernetes-list-type": "atomic"
|
||||
},
|
||||
"path": {
|
||||
"description": "Path is the subdirectory for the Grafana data. If specified, Grafana will ignore anything that is outside this directory in the repository. This is usually something like `grafana/`. Trailing and leading slash are not required. They are always added when needed. The path is relative to the root of the repository, regardless of the leading slash.\n\nWhen specifying something like `grafana-`, we will not look for `grafana-*`; we will only look for files under the directory `/grafana-/`. That means `/grafana-example.json` would not be found.",
|
||||
"type": "string"
|
||||
},
|
||||
"token": {
|
||||
"description": "Token for accessing the repository. If set, it will be encrypted into encryptedToken, then set to an empty string again.",
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"description": "The repository URL (e.g. `https://bitbucket.org/example/test`).",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"com.github.grafana.grafana.pkg.apis.provisioning.v0alpha1.ErrorDetails": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -2695,6 +2726,37 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"com.github.grafana.grafana.pkg.apis.provisioning.v0alpha1.GitLabRepositoryConfig": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"branch"
|
||||
],
|
||||
"properties": {
|
||||
"branch": {
|
||||
"description": "The branch to use in the repository.",
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"encryptedToken": {
|
||||
"description": "Token for accessing the repository, but encrypted. This is not possible to read back to a user decrypted.",
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"x-kubernetes-list-type": "atomic"
|
||||
},
|
||||
"path": {
|
||||
"description": "Path is the subdirectory for the Grafana data. If specified, Grafana will ignore anything that is outside this directory in the repository. This is usually something like `grafana/`. Trailing and leading slash are not required. They are always added when needed. The path is relative to the root of the repository, regardless of the leading slash.\n\nWhen specifying something like `grafana-`, we will not look for `grafana-*`; we will only look for files under the directory `/grafana-/`. That means `/grafana-example.json` would not be found.",
|
||||
"type": "string"
|
||||
},
|
||||
"token": {
|
||||
"description": "Token for accessing the repository. If set, it will be encrypted into encryptedToken, then set to an empty string again.",
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"description": "The repository URL (e.g. `https://gitlab.com/example/test`).",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"com.github.grafana.grafana.pkg.apis.provisioning.v0alpha1.GitRepositoryConfig": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -3271,6 +3333,14 @@
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"bitbucket": {
|
||||
"description": "The repository on Bitbucket. Mutually exclusive with local | github | git.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/com.github.grafana.grafana.pkg.apis.provisioning.v0alpha1.BitbucketRepositoryConfig"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": {
|
||||
"description": "Repository description",
|
||||
"type": "string"
|
||||
@@ -3291,6 +3361,14 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"gitlab": {
|
||||
"description": "The repository on GitLab. Mutually exclusive with local | github | git.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/com.github.grafana.grafana.pkg.apis.provisioning.v0alpha1.GitLabRepositoryConfig"
|
||||
}
|
||||
]
|
||||
},
|
||||
"local": {
|
||||
"description": "The repository on the local file system. Mutually exclusive with local | github.",
|
||||
"allOf": [
|
||||
@@ -3314,12 +3392,14 @@
|
||||
"default": ""
|
||||
},
|
||||
"type": {
|
||||
"description": "The repository type. When selected oneOf the values below should be non-nil\n\nPossible enum values:\n - `\"git\"`\n - `\"github\"`\n - `\"local\"`",
|
||||
"description": "The repository type. When selected oneOf the values below should be non-nil\n\nPossible enum values:\n - `\"bitbucket\"`\n - `\"git\"`\n - `\"github\"`\n - `\"gitlab\"`\n - `\"local\"`",
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"enum": [
|
||||
"bitbucket",
|
||||
"git",
|
||||
"github",
|
||||
"gitlab",
|
||||
"local"
|
||||
]
|
||||
},
|
||||
@@ -3428,12 +3508,14 @@
|
||||
"default": ""
|
||||
},
|
||||
"type": {
|
||||
"description": "The repository type\n\nPossible enum values:\n - `\"git\"`\n - `\"github\"`\n - `\"local\"`",
|
||||
"description": "The repository type\n\nPossible enum values:\n - `\"bitbucket\"`\n - `\"git\"`\n - `\"github\"`\n - `\"gitlab\"`\n - `\"local\"`",
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"enum": [
|
||||
"bitbucket",
|
||||
"git",
|
||||
"github",
|
||||
"gitlab",
|
||||
"local"
|
||||
]
|
||||
},
|
||||
@@ -3462,6 +3544,21 @@
|
||||
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
|
||||
"type": "string"
|
||||
},
|
||||
"availableRepositoryTypes": {
|
||||
"description": "AvailableRepositoryTypes is the list of repository types supported in this instance (e.g. git, bitbucket, github, etc)",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"enum": [
|
||||
"bitbucket",
|
||||
"git",
|
||||
"github",
|
||||
"gitlab",
|
||||
"local"
|
||||
]
|
||||
}
|
||||
},
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -3676,12 +3773,14 @@
|
||||
"default": ""
|
||||
},
|
||||
"type": {
|
||||
"description": "The repository type\n\nPossible enum values:\n - `\"git\"`\n - `\"github\"`\n - `\"local\"`",
|
||||
"description": "The repository type\n\nPossible enum values:\n - `\"bitbucket\"`\n - `\"git\"`\n - `\"github\"`\n - `\"gitlab\"`\n - `\"local\"`",
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"enum": [
|
||||
"bitbucket",
|
||||
"git",
|
||||
"github",
|
||||
"gitlab",
|
||||
"local"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user