diff --git a/.vib/ejbca/goss/ejbca.yaml b/.vib/ejbca/goss/ejbca.yaml new file mode 100644 index 000000000000..1a949358fab0 --- /dev/null +++ b/.vib/ejbca/goss/ejbca.yaml @@ -0,0 +1,10 @@ +command: + check-ejbca-help: + exec: ejbca.sh --help + exit-status: 0 +group: + wildfly: + exists: true +user: + wildfly: + exists: true diff --git a/.vib/ejbca/goss/goss.yaml b/.vib/ejbca/goss/goss.yaml new file mode 100644 index 000000000000..b76703e3b30b --- /dev/null +++ b/.vib/ejbca/goss/goss.yaml @@ -0,0 +1,12 @@ +gossfile: + # Goss tests exclusive to the current container + ../../ejbca/goss/ejbca.yaml: {} + # Load scripts from .vib/common/goss/templates + ../../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/ejbca/goss/vars.yaml b/.vib/ejbca/goss/vars.yaml new file mode 100644 index 000000000000..410230c0ce8e --- /dev/null +++ b/.vib/ejbca/goss/vars.yaml @@ -0,0 +1,25 @@ +binaries: + - java + - jboss-cli.sh + - mysql + - ejbca.sh +files: + - mode: "0664" + paths: + - /opt/bitnami/wildfly/bin/standalone.conf +directories: + - paths: + - /opt/bitnami/ejbca/bin + - /opt/bitnami/ejbca/dist + - /opt/bitnami/ejbca/sql-scripts + - mode: "0775" + paths: + - /opt/bitnami/ejbca + - /opt/bitnami/wildfly + - /opt/bitnami/ejbca/tmp + - /bitnami/ejbca + - /bitnami/wildfly + - /opt/bitnami/wildfly/standalone + - /opt/bitnami/wildfly/domain + - /opt/bitnami/wildfly/tmp +root_dir: /opt/bitnami diff --git a/.vib/ejbca/vib-publish.json b/.vib/ejbca/vib-publish.json index 8b6fe8eab4e6..2b0420f1d3ef 100644 --- a/.vib/ejbca/vib-publish.json +++ b/.vib/ejbca/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": "ejbca/goss/goss.yaml", + "vars_file": "ejbca/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-ejbca" + } + } + } + }, { "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/ejbca/vib-verify.json b/.vib/ejbca/vib-verify.json index a34e8aee9161..7346e63dd83e 100644 --- a/.vib/ejbca/vib-verify.json +++ b/.vib/ejbca/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": "ejbca/goss/goss.yaml", + "vars_file": "ejbca/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-ejbca" + } + } + } + }, { "action_id": "trivy", "params": {