mirror of
https://github.com/bitnami/containers.git
synced 2026-02-19 14:08:07 +08:00
[bitnami/parse] Add VIB tests (#33628)
Signed-off-by: Marcos Bjoerkelund <marcosbd@vmware.com>
This commit is contained in:
committed by
GitHub
parent
95892a609e
commit
5fdad83358
@@ -1,96 +0,0 @@
|
||||
{
|
||||
"context": {
|
||||
"resources": {
|
||||
"url": "{VIB_ENV_CONTAINER_URL}",
|
||||
"path": "{VIB_ENV_PATH}"
|
||||
}
|
||||
},
|
||||
"phases": {
|
||||
"package": {
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "container-image-package",
|
||||
"params": {
|
||||
"application": {
|
||||
"details": {
|
||||
"name": "{VIB_ENV_CONTAINER}",
|
||||
"tag": "{VIB_ENV_TAG}"
|
||||
}
|
||||
},
|
||||
"architectures": [
|
||||
"linux/amd64"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "osspi-application",
|
||||
"params": {
|
||||
"additional_packages_file": "osspi-packages-amd64.json",
|
||||
"scan_type": "BASE_OS",
|
||||
"osm": {
|
||||
"associated_bossd_release": "{VIB_ENV_BOSSD_RELEASE_ID}",
|
||||
"product_name": "main-catalog-{VIB_ENV_CONTAINER}",
|
||||
"product_version": "{VIB_ENV_APP_VERSION}-{VIB_ENV_OS_FLAVOUR}-container"
|
||||
},
|
||||
"resources": {
|
||||
"url": "{VIB_ENV_PACKAGES_JSON_URL}",
|
||||
"path": "/{VIB_ENV_PATH}",
|
||||
"authn": {
|
||||
"header": "Authorization",
|
||||
"token": "Bearer {VIB_ENV_GITHUB_TOKEN}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"publish": {
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "container-image-publish",
|
||||
"params": {
|
||||
"metadata": {
|
||||
"tags": {VIB_ENV_ROLLING_TAGS}
|
||||
},
|
||||
"repository": {
|
||||
"kind": "OCI",
|
||||
"url": "{VIB_ENV_REGISTRY_URL}",
|
||||
"authn": {
|
||||
"username": "{VIB_ENV_REGISTRY_USERNAME}",
|
||||
"password": "{VIB_ENV_REGISTRY_PASSWORD}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
12
.vib/parse/goss/goss.yaml
Normal file
12
.vib/parse/goss/goss.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../parse/goss/parse.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: {}
|
||||
12
.vib/parse/goss/parse.yaml
Normal file
12
.vib/parse/goss/parse.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
command:
|
||||
check-app-version:
|
||||
exec: grep '"version":' /opt/bitnami/parse/package.json
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- '"version": "{{ .Env.APP_VERSION }}",'
|
||||
group:
|
||||
parse:
|
||||
exists: true
|
||||
user:
|
||||
parse:
|
||||
exists: true
|
||||
19
.vib/parse/goss/vars.yaml
Normal file
19
.vib/parse/goss/vars.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
binaries:
|
||||
- node
|
||||
- parse-server
|
||||
- python
|
||||
- mongosh
|
||||
directories:
|
||||
- mode: "0775"
|
||||
paths:
|
||||
- /bitnami/parse
|
||||
- /opt/bitnami/parse
|
||||
- /opt/bitnami/parse/lib
|
||||
- /opt/bitnami/parse/logs
|
||||
- /opt/bitnami/parse/public_html
|
||||
- /opt/bitnami/parse/tmp
|
||||
- /opt/bitnami/parse/views
|
||||
files:
|
||||
- paths:
|
||||
- /opt/bitnami/parse/package.json
|
||||
root_dir: /opt/bitnami
|
||||
@@ -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": "parse/goss/goss.yaml",
|
||||
"vars_file": "parse/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-parse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
|
||||
@@ -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": "parse/goss/goss.yaml",
|
||||
"vars_file": "parse/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-parse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
|
||||
Reference in New Issue
Block a user