-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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>
- Loading branch information
1 parent
fe763b3
commit dd43899
Showing
8 changed files
with
276 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |