mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-03-27 23:02:54 +00:00
Fix k8s secret schema (#4819)
This commit is contained in:
parent
95f63e42f3
commit
986f6c4254
3 changed files with 28 additions and 6 deletions
|
@ -0,0 +1,10 @@
|
||||||
|
steps:
|
||||||
|
- name: Build Container
|
||||||
|
image: woodpeckerci/plugin-kaniko:1.2.1
|
||||||
|
backend_options:
|
||||||
|
kubernetes:
|
||||||
|
secrets:
|
||||||
|
- name: aws-secret
|
||||||
|
key: credentials
|
||||||
|
target:
|
||||||
|
file: /root/.aws/credentials
|
|
@ -762,15 +762,23 @@
|
||||||
"description": "A target which a native Kubernetes secret maps to.",
|
"description": "A target which a native Kubernetes secret maps to.",
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
{
|
{
|
||||||
"env": {
|
"type": "object",
|
||||||
"description": "The name of the environment variable which secret maps to.",
|
"additionalProperties": false,
|
||||||
"type": "string"
|
"properties": {
|
||||||
|
"env": {
|
||||||
|
"description": "The name of the environment variable which secret maps to.",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": {
|
"type": "object",
|
||||||
"description": "The filename (path) which secret maps to.",
|
"additionalProperties": false,
|
||||||
"type": "string"
|
"properties": {
|
||||||
|
"file": {
|
||||||
|
"description": "The filename (path) which secret maps to.",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -80,6 +80,10 @@ func TestSchema(t *testing.T) {
|
||||||
name: "Map and Sequence Merge", // https://woodpecker-ci.org/docs/next/usage/advanced-yaml-syntax
|
name: "Map and Sequence Merge", // https://woodpecker-ci.org/docs/next/usage/advanced-yaml-syntax
|
||||||
testFile: ".woodpecker/test-merge-map-and-sequence.yaml",
|
testFile: ".woodpecker/test-merge-map-and-sequence.yaml",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Backend options",
|
||||||
|
testFile: ".woodpecker/test-backend-options.yaml",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "Broken Config",
|
name: "Broken Config",
|
||||||
testFile: ".woodpecker/test-broken.yaml",
|
testFile: ".woodpecker/test-broken.yaml",
|
||||||
|
|
Loading…
Reference in a new issue