[bitnami/gradle] Add VIB tests (#24873)

* [bitnami/gradle] Add VIB tests

Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com>
This commit is contained in:
Jose Antonio Carmona 2023-02-24 18:04:17 +01:00 committed by GitHub
parent 93a65ed1b9
commit a5d3c3eddb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 55 additions and 2 deletions

View File

@ -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: {}

View File

@ -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

View File

@ -0,0 +1,4 @@
binaries:
- java
- gradle
root_dir: /opt/bitnami

View File

@ -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": {

View File

@ -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": {