[bitnami/mariadb-min] ci: add VIB tests (#82157)

This commit is contained in:
Juan Ariza Toledano
2025-06-10 12:25:55 +02:00
committed by GitHub
parent f987902893
commit 2f5daafbda
4 changed files with 112 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
gossfile:
# Goss tests exclusive to the current container
../../mariadb-min/goss/mariadb-min.yaml: {}
# Load scripts from .vib/common/goss/templates
../../common/goss/templates/check-app-version-no-shell-stdout.yaml: {}
../../common/goss/templates/check-ca-certs.yaml: {}
../../common/goss/templates/check-files.yaml: {}
../../common/goss/templates/check-static.yaml: {}
../../common/goss/templates/check-libgcc.yaml: {}
../../common/goss/templates/check-openssl-fips.yaml: {}

View File

@@ -0,0 +1,8 @@
command:
check-mariadbd:
exec:
- mariadbd
- --help
exit-status: 0
stdout:
- "Usage: mariadbd [OPTIONS]"

View File

@@ -0,0 +1,12 @@
files:
- mode: "0644"
paths:
- /opt/bitnami/os/.spdx-os-mariadb-min.spdx
- /opt/bitnami/mariadb/.spdx-mariadb-min.spdx
- mode: "0755"
paths:
- /opt/bitnami/mariadb/bin/mariadb-admin
- /opt/bitnami/mariadb/sbin/mariadbd
version:
bin_name: mariadbd
flag: --version

View File

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