[TNZ-34041] Add Grafana Alloy vib tests (#81428)

Signed-off-by: David Gomez <david.gomez@broadcom.com>
This commit is contained in:
David Gomez
2025-05-22 09:11:20 +02:00
committed by GitHub
parent 4fbd352ce0
commit 1d9fd71d7d
3 changed files with 94 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
gossfile:
# Load scripts from .vib/common/goss/templates
../../common/goss/templates/check-app-version.yaml: {}
../../common/goss/templates/check-binaries.yaml: {}
../../common/goss/templates/check-broken-symlinks.yaml: {}
../../common/goss/templates/check-ca-certs.yaml: {}
../../common/goss/templates/check-directories.yaml: {}
../../common/goss/templates/check-linked-libraries.yaml: {}
../../common/goss/templates/check-spdx.yaml: {}

View File

@@ -0,0 +1,9 @@
binaries:
- alloy
root_dir: /opt/bitnami
directories:
- paths:
- /opt/bitnami/grafana-alloy
version:
bin_name: alloy
flag: version

View File

@@ -0,0 +1,73 @@
{
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "{VIB_ENV_PATH}"
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"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": "grafana-alloy/goss/goss.yaml",
"vars_file": "grafana-alloy/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-grafana-alloy"
}
}
}
},
{
"action_id": "trivy",
"params": {
"threshold": "LOW",
"vuln_type": [
"OS"
]
}
},
{
"action_id": "grype",
"params": {
"threshold": "CRITICAL",
"package_type": [
"OS"
]
}
}
]
}
}
}