mirror of
https://github.com/bitnami/containers.git
synced 2026-02-14 08:37:21 +08:00
[bitnami/spark] Add VIB tests (#34292)
* [bitnami/spark] Add VIB tests Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Add triggers Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Add group ownership check Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Remove triggers Signed-off-by: Miguel Ruiz <miruiz@vmware.com> --------- Signed-off-by: Miguel Ruiz <miruiz@vmware.com>
This commit is contained in:
12
.vib/spark/goss/goss.yaml
Normal file
12
.vib/spark/goss/goss.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../spark/goss/spark.yaml: {}
|
||||
# Load scripts from .vib/common/goss/templates
|
||||
../../common/goss/templates/check-app-version.yaml: {}
|
||||
../../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-linked-libraries.yaml: {}
|
||||
../../common/goss/templates/check-sed-in-place.yaml: {}
|
||||
../../common/goss/templates/check-spdx.yaml: {}
|
||||
6
.vib/spark/goss/spark.yaml
Normal file
6
.vib/spark/goss/spark.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
command:
|
||||
{{- range $module:= .Vars.python.modules }}
|
||||
check-python-{{ $module }}:
|
||||
exec: /opt/bitnami/spark/venv/bin/python -c 'import {{ $module }}'
|
||||
exit-status: 0
|
||||
{{- end }}
|
||||
32
.vib/spark/goss/vars.yaml
Normal file
32
.vib/spark/goss/vars.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
binaries:
|
||||
- python
|
||||
- spark-shell
|
||||
- spark-submit
|
||||
- java
|
||||
directories:
|
||||
- mode: "0775"
|
||||
group: "root"
|
||||
paths:
|
||||
- /opt/bitnami/spark/tmp
|
||||
- /opt/bitnami/spark/logs
|
||||
- /opt/bitnami/spark/conf
|
||||
- /opt/bitnami/spark/work
|
||||
- /opt/bitnami/spark/jars
|
||||
root_dir: /opt/bitnami
|
||||
version:
|
||||
bin_name: spark-shell --version
|
||||
flag: --version
|
||||
linked_libraries:
|
||||
exclude_paths:
|
||||
# Exclude specific Pip modules from paths because they link to non-existent libraries that are not expected to exist
|
||||
- .*\/lib\/python[0-9.]+\/site-packages\/numpy.libs\/.*
|
||||
- .*\/lib\/python[0-9.]+\/site-packages\/psycopg2_binary.libs\/.*
|
||||
python:
|
||||
modules:
|
||||
- pyspark
|
||||
- awscli
|
||||
- boto3
|
||||
- botocore
|
||||
- psycopg2
|
||||
- pandas
|
||||
- py4j
|
||||
@@ -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": "spark/goss/goss.yaml",
|
||||
"vars_file": "spark/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-spark"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"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}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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": "spark/goss/goss.yaml",
|
||||
"vars_file": "spark/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-spark"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
|
||||
Reference in New Issue
Block a user