diff --git a/.vib/apache-exporter/goss/apache-exporter.yaml b/.vib/apache-exporter/goss/apache-exporter.yaml new file mode 100644 index 000000000000..50336a42e661 --- /dev/null +++ b/.vib/apache-exporter/goss/apache-exporter.yaml @@ -0,0 +1,7 @@ +command: + check-apache-exporter-run: + exec: timeout --preserve-status 5 apache_exporter + timeout: 8000 + exit-status: 0 + stderr: + - Starting apache_exporter diff --git a/.vib/apache-exporter/goss/goss.yaml b/.vib/apache-exporter/goss/goss.yaml new file mode 100644 index 000000000000..3c973d5e7dbb --- /dev/null +++ b/.vib/apache-exporter/goss/goss.yaml @@ -0,0 +1,10 @@ +gossfile: + # Goss tests exclusive to the current container + ../../apache-exporter/goss/apache-exporter.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-linked-libraries.yaml: {} + ../../common/goss/templates/check-sed-in-place.yaml: {} + ../../common/goss/templates/check-spdx.yaml: {} diff --git a/.vib/apache-exporter/goss/vars.yaml b/.vib/apache-exporter/goss/vars.yaml new file mode 100644 index 000000000000..f0cfba846b75 --- /dev/null +++ b/.vib/apache-exporter/goss/vars.yaml @@ -0,0 +1,6 @@ +binaries: + - apache_exporter +root_dir: /opt/bitnami +version: + bin_name: apache_exporter + flag: --version diff --git a/.vib/apache-exporter/vib-publish.json b/.vib/apache-exporter/vib-publish.json index 8b6fe8eab4e6..3f6949ae97e0 100644 --- a/.vib/apache-exporter/vib-publish.json +++ b/.vib/apache-exporter/vib-publish.json @@ -3,7 +3,8 @@ "resources": { "url": "{VIB_ENV_CONTAINER_URL}", "path": "{VIB_ENV_PATH}" - } + }, + "runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" }, "phases": { "package": { @@ -33,6 +34,21 @@ }, "verify": { "actions": [ + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "apache-exporter/goss/goss.yaml", + "vars_file": "apache-exporter/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-apache-exporter" + } + } + } + }, { "action_id": "trivy", "params": { @@ -77,9 +93,9 @@ "url": "{VIB_ENV_PACKAGES_JSON_URL}", "path": "/{VIB_ENV_PATH}", "authn": { - "header": "Authorization", - "token": "Bearer {VIB_ENV_GITHUB_TOKEN}" - } + "header": "Authorization", + "token": "Bearer {VIB_ENV_GITHUB_TOKEN}" + } } } } diff --git a/.vib/apache-exporter/vib-verify.json b/.vib/apache-exporter/vib-verify.json index a34e8aee9161..ef16f91e4a7d 100644 --- a/.vib/apache-exporter/vib-verify.json +++ b/.vib/apache-exporter/vib-verify.json @@ -3,7 +3,8 @@ "resources": { "url": "{SHA_ARCHIVE}", "path": "{VIB_ENV_PATH}" - } + }, + "runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" }, "phases": { "package": { @@ -29,6 +30,21 @@ }, "verify": { "actions": [ + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "apache-exporter/goss/goss.yaml", + "vars_file": "apache-exporter/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-apache-exporter" + } + } + } + }, { "action_id": "trivy", "params": {