From 3e59fd939a815c94ce2e7626299f6b4bccc50a90 Mon Sep 17 00:00:00 2001 From: Juan Ariza Toledano Date: Thu, 14 Nov 2024 10:37:12 +0100 Subject: [PATCH] [bitnami/statsd-exporter] ci: VIB tests (#74887) --- .vib/statsd-exporter/goss/goss.yaml | 12 +++++ .vib/statsd-exporter/goss/vars.yaml | 6 +++ .vib/statsd-exporter/vib-verify.json | 73 ++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+) create mode 100644 .vib/statsd-exporter/goss/goss.yaml create mode 100644 .vib/statsd-exporter/goss/vars.yaml create mode 100644 .vib/statsd-exporter/vib-verify.json diff --git a/.vib/statsd-exporter/goss/goss.yaml b/.vib/statsd-exporter/goss/goss.yaml new file mode 100644 index 0000000000000..5459a81ef0f7b --- /dev/null +++ b/.vib/statsd-exporter/goss/goss.yaml @@ -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-linked-libraries.yaml: {} + ../../common/goss/templates/check-sed-in-place.yaml: {} + ../../common/goss/templates/check-spdx.yaml: {} diff --git a/.vib/statsd-exporter/goss/vars.yaml b/.vib/statsd-exporter/goss/vars.yaml new file mode 100644 index 0000000000000..33c6126c460b1 --- /dev/null +++ b/.vib/statsd-exporter/goss/vars.yaml @@ -0,0 +1,6 @@ +binaries: + - statsd_exporter +root_dir: /opt/bitnami +version: + bin_name: statsd_exporter + flag: --version diff --git a/.vib/statsd-exporter/vib-verify.json b/.vib/statsd-exporter/vib-verify.json new file mode 100644 index 0000000000000..bd6d067f5984b --- /dev/null +++ b/.vib/statsd-exporter/vib-verify.json @@ -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": "trivy", + "params": { + "threshold": "LOW", + "vuln_type": [ + "OS" + ] + } + }, + { + "action_id": "grype", + "params": { + "threshold": "CRITICAL", + "package_type": [ + "OS" + ] + } + }, + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "statsd-exporter/goss/goss.yaml", + "vars_file": "statsd-exporter/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-statsd-exporter" + } + } + } + } + ] + } + } +}