diff --git a/.vib/prometheus/goss/goss.yaml b/.vib/prometheus/goss/goss.yaml new file mode 100644 index 000000000000..87a6ca1cafea --- /dev/null +++ b/.vib/prometheus/goss/goss.yaml @@ -0,0 +1,13 @@ +gossfile: + # Goss tests exclusive to the current container + ../../prometheus/goss/prometheus.yaml: {} + # 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-files.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/prometheus/goss/prometheus.yaml b/.vib/prometheus/goss/prometheus.yaml new file mode 100644 index 000000000000..03952424f3cc --- /dev/null +++ b/.vib/prometheus/goss/prometheus.yaml @@ -0,0 +1,11 @@ +command: + check-config-format: + exec: promtool check config /opt/bitnami/prometheus/conf/prometheus.yml + exit-status: 0 + check-prometheus-run: + exec: timeout --preserve-status 5 prometheus --config.file=/opt/bitnami/prometheus/conf/prometheus.yml + timeout: 8000 + exit-status: 0 + stderr: + - Starting Prometheus Server + - Server is ready diff --git a/.vib/prometheus/goss/vars.yaml b/.vib/prometheus/goss/vars.yaml new file mode 100644 index 000000000000..9c34ff93b9c5 --- /dev/null +++ b/.vib/prometheus/goss/vars.yaml @@ -0,0 +1,17 @@ +binaries: + - prometheus + - promtool +directories: + - mode: "0775" + paths: + - /opt/bitnami/prometheus/data + - paths: + - /opt/bitnami/prometheus/conf/console_libraries + - /opt/bitnami/prometheus/conf/consoles +files: + - paths: + - /opt/bitnami/prometheus/conf/prometheus.yml +root_dir: /opt/bitnami +version: + bin_name: prometheus + flag: --version diff --git a/.vib/prometheus/vib-publish.json b/.vib/prometheus/vib-publish.json index 8b6fe8eab4e6..de3be8fe4fe5 100644 --- a/.vib/prometheus/vib-publish.json +++ b/.vib/prometheus/vib-publish.json @@ -3,7 +3,8 @@ "resources": { "url": "{VIB_ENV_CONTAINER_URL}", "path": "{VIB_ENV_PATH}" - } + }, + "runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" }, "phases": { "package": { @@ -82,6 +83,21 @@ } } } + }, + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "prometheus/goss/goss.yaml", + "vars_file": "prometheus/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-prometheus" + } + } + } } ] }, diff --git a/.vib/prometheus/vib-verify.json b/.vib/prometheus/vib-verify.json index a34e8aee9161..9380bd1700bf 100644 --- a/.vib/prometheus/vib-verify.json +++ b/.vib/prometheus/vib-verify.json @@ -3,7 +3,8 @@ "resources": { "url": "{SHA_ARCHIVE}", "path": "{VIB_ENV_PATH}" - } + }, + "runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" }, "phases": { "package": { @@ -46,6 +47,21 @@ "OS" ] } + }, + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "prometheus/goss/goss.yaml", + "vars_file": "prometheus/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-prometheus" + } + } + } } ] }