mirror of
https://github.com/bitnami/containers.git
synced 2026-03-29 16:27:49 +08:00
[bitnami/tomcat-jdk] Add tests for tomcat-jdk (#46946)
* [bitnami/tomcat-jdk] Add tests for tomcat-jdk Signed-off-by: David Gomez <dgomezleon@vmware.com> * [bitnami/tomcat-jdk] Apply feedback Signed-off-by: David Gomez <dgomezleon@vmware.com> --------- Signed-off-by: David Gomez <dgomezleon@vmware.com>
This commit is contained in:
15
.vib/tomcat-jdk-11/goss/goss.yaml
Normal file
15
.vib/tomcat-jdk-11/goss/goss.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
# Copyright VMware, Inc.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../tomcat-jdk-11/goss/tomcat-jdk-11.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: {}
|
||||
28
.vib/tomcat-jdk-11/goss/tomcat-jdk-11.yaml
Normal file
28
.vib/tomcat-jdk-11/goss/tomcat-jdk-11.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
# Copyright VMware, Inc.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
file:
|
||||
/opt/bitnami/apache-tomcat:
|
||||
exists: true
|
||||
filetype: symlink
|
||||
linked-to: tomcat
|
||||
/opt/bitnami/tomcat/webapps:
|
||||
exists: true
|
||||
filetype: symlink
|
||||
linked-to: /bitnami/tomcat/webapps
|
||||
/app:
|
||||
exists: true
|
||||
filetype: symlink
|
||||
linked-to: /bitnami/tomcat/webapps
|
||||
command:
|
||||
check-app-version:
|
||||
exec: version.sh
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- {{ .Env.APP_VERSION }}
|
||||
group:
|
||||
tomcat:
|
||||
exists: true
|
||||
user:
|
||||
tomcat:
|
||||
exists: true
|
||||
22
.vib/tomcat-jdk-11/goss/vars.yaml
Normal file
22
.vib/tomcat-jdk-11/goss/vars.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
binaries:
|
||||
- java
|
||||
- render-template
|
||||
directories:
|
||||
- mode: "0775"
|
||||
paths:
|
||||
- /bitnami/tomcat/webapps
|
||||
- /opt/bitnami/tomcat
|
||||
- /opt/bitnami/tomcat/lib
|
||||
- /opt/bitnami/tomcat/temp
|
||||
- /opt/bitnami/tomcat/logs
|
||||
- /opt/bitnami/tomcat/conf
|
||||
- /opt/bitnami/tomcat/work
|
||||
- /opt/bitnami/tomcat/webapps_default
|
||||
files:
|
||||
- mode: "0664"
|
||||
paths:
|
||||
- /opt/bitnami/tomcat/bin/setenv.sh
|
||||
- mode: "0755"
|
||||
paths:
|
||||
- /opt/bitnami/tomcat/bin/version.sh
|
||||
root_dir: /opt/bitnami
|
||||
73
.vib/tomcat-jdk-11/vib-verify.json
Normal file
73
.vib/tomcat-jdk-11/vib-verify.json
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"context": {
|
||||
"resources": {
|
||||
"url": "{SHA_ARCHIVE}",
|
||||
"path": "{VIB_ENV_PATH}"
|
||||
},
|
||||
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
|
||||
},
|
||||
"phases": {
|
||||
"package": {
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "container-image-package",
|
||||
"params": {
|
||||
"application": {
|
||||
"details": {
|
||||
"name": "{VIB_ENV_CONTAINER}",
|
||||
"tag": "{VIB_ENV_TAG}"
|
||||
}
|
||||
},
|
||||
"architectures": [
|
||||
"linux/amd64",
|
||||
"linux/arm64"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "container-image-lint",
|
||||
"params": {
|
||||
"threshold": "error"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"verify": {
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
"threshold": "CRITICAL",
|
||||
"vuln_type": [
|
||||
"OS"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "grype",
|
||||
"params": {
|
||||
"threshold": "CRITICAL",
|
||||
"package_type": [
|
||||
"OS"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib"
|
||||
},
|
||||
"tests_file": "tomcat-jdk-11/goss/goss.yaml",
|
||||
"vars_file": "tomcat-jdk-11/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-tomcat-jdk-11"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
15
.vib/tomcat-jdk-17/goss/goss.yaml
Normal file
15
.vib/tomcat-jdk-17/goss/goss.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
# Copyright VMware, Inc.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../tomcat-jdk-17/goss/tomcat-jdk-17.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: {}
|
||||
28
.vib/tomcat-jdk-17/goss/tomcat-jdk-17.yaml
Normal file
28
.vib/tomcat-jdk-17/goss/tomcat-jdk-17.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
# Copyright VMware, Inc.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
file:
|
||||
/opt/bitnami/apache-tomcat:
|
||||
exists: true
|
||||
filetype: symlink
|
||||
linked-to: tomcat
|
||||
/opt/bitnami/tomcat/webapps:
|
||||
exists: true
|
||||
filetype: symlink
|
||||
linked-to: /bitnami/tomcat/webapps
|
||||
/app:
|
||||
exists: true
|
||||
filetype: symlink
|
||||
linked-to: /bitnami/tomcat/webapps
|
||||
command:
|
||||
check-app-version:
|
||||
exec: version.sh
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- {{ .Env.APP_VERSION }}
|
||||
group:
|
||||
tomcat:
|
||||
exists: true
|
||||
user:
|
||||
tomcat:
|
||||
exists: true
|
||||
22
.vib/tomcat-jdk-17/goss/vars.yaml
Normal file
22
.vib/tomcat-jdk-17/goss/vars.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
binaries:
|
||||
- java
|
||||
- render-template
|
||||
directories:
|
||||
- mode: "0775"
|
||||
paths:
|
||||
- /bitnami/tomcat/webapps
|
||||
- /opt/bitnami/tomcat
|
||||
- /opt/bitnami/tomcat/lib
|
||||
- /opt/bitnami/tomcat/temp
|
||||
- /opt/bitnami/tomcat/logs
|
||||
- /opt/bitnami/tomcat/conf
|
||||
- /opt/bitnami/tomcat/work
|
||||
- /opt/bitnami/tomcat/webapps_default
|
||||
files:
|
||||
- mode: "0664"
|
||||
paths:
|
||||
- /opt/bitnami/tomcat/bin/setenv.sh
|
||||
- mode: "0755"
|
||||
paths:
|
||||
- /opt/bitnami/tomcat/bin/version.sh
|
||||
root_dir: /opt/bitnami
|
||||
73
.vib/tomcat-jdk-17/vib-verify.json
Normal file
73
.vib/tomcat-jdk-17/vib-verify.json
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"context": {
|
||||
"resources": {
|
||||
"url": "{SHA_ARCHIVE}",
|
||||
"path": "{VIB_ENV_PATH}"
|
||||
},
|
||||
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
|
||||
},
|
||||
"phases": {
|
||||
"package": {
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "container-image-package",
|
||||
"params": {
|
||||
"application": {
|
||||
"details": {
|
||||
"name": "{VIB_ENV_CONTAINER}",
|
||||
"tag": "{VIB_ENV_TAG}"
|
||||
}
|
||||
},
|
||||
"architectures": [
|
||||
"linux/amd64",
|
||||
"linux/arm64"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "container-image-lint",
|
||||
"params": {
|
||||
"threshold": "error"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"verify": {
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
"threshold": "CRITICAL",
|
||||
"vuln_type": [
|
||||
"OS"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "grype",
|
||||
"params": {
|
||||
"threshold": "CRITICAL",
|
||||
"package_type": [
|
||||
"OS"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib"
|
||||
},
|
||||
"tests_file": "tomcat-jdk-17/goss/goss.yaml",
|
||||
"vars_file": "tomcat-jdk-17/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-tomcat-jdk-17"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user