Fix k8s secret schema (#4819)

This commit is contained in:
qwerty287 2025-02-07 19:36:56 +02:00 committed by GitHub
parent 95f63e42f3
commit 986f6c4254
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 28 additions and 6 deletions

View file

@ -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

View file

@ -762,15 +762,23 @@
"description": "A target which a native Kubernetes secret maps to.",
"oneOf": [
{
"env": {
"description": "The name of the environment variable which secret maps to.",
"type": "string"
"type": "object",
"additionalProperties": false,
"properties": {
"env": {
"description": "The name of the environment variable which secret maps to.",
"type": "string"
}
}
},
{
"file": {
"description": "The filename (path) which secret maps to.",
"type": "string"
"type": "object",
"additionalProperties": false,
"properties": {
"file": {
"description": "The filename (path) which secret maps to.",
"type": "string"
}
}
}
]

View file

@ -80,6 +80,10 @@ func TestSchema(t *testing.T) {
name: "Map and Sequence Merge", // https://woodpecker-ci.org/docs/next/usage/advanced-yaml-syntax
testFile: ".woodpecker/test-merge-map-and-sequence.yaml",
},
{
name: "Backend options",
testFile: ".woodpecker/test-backend-options.yaml",
},
{
name: "Broken Config",
testFile: ".woodpecker/test-broken.yaml",