Skip to content

[bitnami/superset] Add VIB tests #67410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .vib/superset/goss/goss.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0

gossfile:
# Goss tests exclusive to the current container
../../superset/goss/superset.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-linked-libraries.yaml: {}
../../common/goss/templates/check-sed-in-place.yaml: {}
../../common/goss/templates/check-spdx.yaml: {}
17 changes: 17 additions & 0 deletions .vib/superset/goss/superset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0

command:
check-app-version:
exec: echo "SECRET_KEY='123456789abcdef'" > /tmp/superset_config.py && SUPERSET_CONFIG_PATH="/tmp/superset_config.py" superset version
exit-status: 0
stdout:
- "{{ .Env.APP_VERSION }}"
check-subpackages:
# Check python packages that should have been installed
exec: . /opt/bitnami/superset/venv/bin/activate && pip list
exit-status: 0
stdout:
{{ range $subpackage := .Vars.subpackages }}
- "{{ $subpackage }}"
{{ end }}
27 changes: 27 additions & 0 deletions .vib/superset/goss/vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
binaries:
- celery
- gunicorn
- superset
- python
- pip
linked_libraries:
exclude_paths:
# Ignore python venv executable scripts
- /opt/bitnami/superset/venv/.*
directories:
- mode: "0775"
paths:
- /opt/bitnami/superset
- /opt/bitnami/superset/superset_home
- /opt/bitnami/superset/logs
- /opt/bitnami/superset/tmp
root_dir: /opt/bitnami
subpackages:
- celery
- flower
- Flask
- gunicorn
- mysql
- mysqlclient
- psycopg2
- redis
75 changes: 75 additions & 0 deletions .vib/superset/vib-verify.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "{VIB_ENV_PATH}"
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
"actions": [
{
"action_id": "container-image-package",
"params": {
"timeout_minutes": 60,
"application": {
"details": {
"name": "{VIB_ENV_CONTAINER}",
"tag": "{VIB_ENV_TAG}"
}
},
"architectures": [
"linux/amd64",
"linux/arm64"
],
"timeout_minutes": 50
}
},
{
"action_id": "container-image-lint",
"params": {
"threshold": "error"
}
}
]
},
"verify": {
"actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "superset/goss/goss.yaml",
"vars_file": "superset/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-superset"
}
}
}
},
{
"action_id": "trivy",
"params": {
"threshold": "LOW",
"vuln_type": [
"OS"
]
}
},
{
"action_id": "grype",
"params": {
"threshold": "CRITICAL",
"package_type": [
"OS"
]
}
}
]
}
}
}
Loading