[bitnami/kes] test: 👷 Add VIB files (#79118)

Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com>
This commit is contained in:
Javier J. Salmerón García
2025-03-25 09:42:56 +01:00
committed by GitHub
parent 44f4035aba
commit f14bcfa908
4 changed files with 105 additions and 0 deletions

9
.vib/kes/goss/goss.yaml Normal file
View File

@@ -0,0 +1,9 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
gossfile:
# Goss tests exclusive to the current container
../../kes/goss/kes.yaml: {}
# Load scripts from .vib/common/goss/templates
../../common/goss/templates/check-ca-certs.yaml: {}
../../common/goss/templates/check-files.yaml: {}

16
.vib/kes/goss/kes.yaml Normal file
View File

@@ -0,0 +1,16 @@
command:
check-kes-version:
exec:
- /kes
- --version
exit-status: 0
stdout:
- {{ .Env.APP_VERSION }}
check-kes-help:
exec:
- /kes
- --help
exit-status: 0
# Replace "-" with "+" in the version string
stderr:
- Start a KES server

7
.vib/kes/goss/vars.yaml Normal file
View File

@@ -0,0 +1,7 @@
files:
- mode: "0644"
paths:
- /opt/bitnami/kes/.spdx-kes.spdx
- mode: "0755"
paths:
- /kes

73
.vib/kes/vib-verify.json Normal file
View File

@@ -0,0 +1,73 @@
{
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "{VIB_ENV_PATH}"
},
"runtime_parameters": "Y29tbWFuZDogWyIvc2hhcmVkL2J1c3lib3giLCAic2xlZXAiLCAiMzYwMCJdCg=="
},
"phases": {
"package": {
"actions": [
{
"action_id": "container-image-package",
"params": {
"application": {
"details": {
"name": "{VIB_ENV_CONTAINER}",
"tag": "{VIB_ENV_TAG}"
}
},
"architectures": [
"linux/amd64",
"linux/arm64"
]
}
},
{
"action_id": "container-image-lint",
"params": {
"threshold": "error"
}
}
]
},
"verify": {
"actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "kes/goss/goss.yaml",
"vars_file": "kes/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-kes"
}
}
}
},
{
"action_id": "trivy",
"params": {
"threshold": "LOW",
"vuln_type": [
"OS"
]
}
},
{
"action_id": "grype",
"params": {
"threshold": "CRITICAL",
"package_type": [
"OS"
]
}
}
]
}
}
}