diff --git a/.vib/gradle/goss/goss.yaml b/.vib/gradle/goss/goss.yaml new file mode 100644 index 000000000000..2223d9e5857a --- /dev/null +++ b/.vib/gradle/goss/goss.yaml @@ -0,0 +1,9 @@ +gossfile: + # Goss tests exclusive to the current container + ../../gradle/goss/gradle.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-linked-libraries.yaml: {} + ../../common/goss/templates/check-sed-in-place.yaml: {} diff --git a/.vib/gradle/goss/gradle.yaml b/.vib/gradle/goss/gradle.yaml new file mode 100644 index 000000000000..7439040af626 --- /dev/null +++ b/.vib/gradle/goss/gradle.yaml @@ -0,0 +1,8 @@ +command: + # Major and Minor versions are often shown as "x.0" and "x.y" instead of "x.0.0" and "x.y.0" + check-app-version: + exec: gradle -v | grep "Gradle $(echo $APP_VERSION | sed -E 's|([0-9]+\.[0-9]+)\.0$|\1|g')" + exit-status: 0 + create-sample-project: + exec: echo | gradle init && gradle build + exit-status: 0 \ No newline at end of file diff --git a/.vib/gradle/goss/vars.yaml b/.vib/gradle/goss/vars.yaml new file mode 100644 index 000000000000..2eb4e3533231 --- /dev/null +++ b/.vib/gradle/goss/vars.yaml @@ -0,0 +1,4 @@ +binaries: + - java + - gradle +root_dir: /opt/bitnami diff --git a/.vib/gradle/vib-publish.json b/.vib/gradle/vib-publish.json index f58738648055..e2ac8b519ff3 100644 --- a/.vib/gradle/vib-publish.json +++ b/.vib/gradle/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": "gradle/goss/goss.yaml", + "vars_file": "gradle/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-gradle" + } + } + } + }, { "action_id": "trivy", "params": { diff --git a/.vib/gradle/vib-verify.json b/.vib/gradle/vib-verify.json index 835cd556e241..9d5168e07f08 100644 --- a/.vib/gradle/vib-verify.json +++ b/.vib/gradle/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": "gradle/goss/goss.yaml", + "vars_file": "gradle/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-gradle" + } + } + } + }, { "action_id": "trivy", "params": {