From 7c65c2808a0cbdde0694c8e1157174a98dd3bc02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20J=2E=20Salmer=C3=B3n=20Garc=C3=ADa?= Date: Mon, 30 Jun 2025 11:44:59 +0200 Subject: [PATCH] [bitnami/grafana-pyroscope] ci: :construction_worker: Add VIB files (#82796) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Javier J. Salmerón García --- .vib/grafana-pyroscope/goss/goss.yaml | 9 +++ .../goss/grafana-pyroscope.yaml | 23 ++++++ .vib/grafana-pyroscope/goss/vars.yaml | 8 ++ .vib/grafana-pyroscope/vib-verify.json | 73 +++++++++++++++++++ 4 files changed, 113 insertions(+) create mode 100644 .vib/grafana-pyroscope/goss/goss.yaml create mode 100644 .vib/grafana-pyroscope/goss/grafana-pyroscope.yaml create mode 100644 .vib/grafana-pyroscope/goss/vars.yaml create mode 100644 .vib/grafana-pyroscope/vib-verify.json diff --git a/.vib/grafana-pyroscope/goss/goss.yaml b/.vib/grafana-pyroscope/goss/goss.yaml new file mode 100644 index 000000000000..216344f88350 --- /dev/null +++ b/.vib/grafana-pyroscope/goss/goss.yaml @@ -0,0 +1,9 @@ +# Copyright Broadcom, Inc. All Rights Reserved. +# SPDX-License-Identifier: APACHE-2.0 + +gossfile: + # Goss tests exclusive to the current container + ../../grafana-pyroscope/goss/grafana-pyroscope.yaml: {} + # Load scripts from .vib/common/goss/templates + ../../common/goss/templates/check-ca-certs.yaml: {} + ../../common/goss/templates/check-files.yaml: {} diff --git a/.vib/grafana-pyroscope/goss/grafana-pyroscope.yaml b/.vib/grafana-pyroscope/goss/grafana-pyroscope.yaml new file mode 100644 index 000000000000..4cfc62c77613 --- /dev/null +++ b/.vib/grafana-pyroscope/goss/grafana-pyroscope.yaml @@ -0,0 +1,23 @@ +# NOTE: The kserve binaries do not have a --version flag, so we cannot perform a version check +command: + check-help: + exec: + - pyroscope + - --help + exit-status: 0 + stdout: + - Base path to serve + check-version: + exec: + - pyroscope + - --version + exit-status: 0 + stdout: + - {{ .Env.APP_VERSION }} + check-profilecli: + exec: + - profilecli + - --help + exit-status: 0 + stdout: + - Check Pyroscope health diff --git a/.vib/grafana-pyroscope/goss/vars.yaml b/.vib/grafana-pyroscope/goss/vars.yaml new file mode 100644 index 000000000000..88d0abcb859a --- /dev/null +++ b/.vib/grafana-pyroscope/goss/vars.yaml @@ -0,0 +1,8 @@ +files: + - mode: "0644" + paths: + - /opt/bitnami/grafana-pyroscope/.spdx-grafana-pyroscope.spdx + - mode: "0755" + paths: + - /opt/bitnami/grafana-pyroscope/bin/pyroscope + - /opt/bitnami/grafana-pyroscope/bin/profilecli diff --git a/.vib/grafana-pyroscope/vib-verify.json b/.vib/grafana-pyroscope/vib-verify.json new file mode 100644 index 000000000000..ce2bde61c0e3 --- /dev/null +++ b/.vib/grafana-pyroscope/vib-verify.json @@ -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": "grafana-pyroscope/goss/goss.yaml", + "vars_file": "grafana-pyroscope/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-grafana-pyroscope" + } + } + } + }, + { + "action_id": "trivy", + "params": { + "threshold": "LOW", + "vuln_type": [ + "OS" + ] + } + }, + { + "action_id": "grype", + "params": { + "threshold": "CRITICAL", + "package_type": [ + "OS" + ] + } + } + ] + } + } +}