mirror of
https://github.com/bitnami/containers.git
synced 2026-02-10 21:27:26 +08:00
[bitnami/nessie] chore: 👷 ✅ Add VIB integration (#67393)
Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
This commit is contained in:
committed by
GitHub
parent
4a7d938401
commit
263ed3152c
15
.vib/nessie-utils/goss/goss.yaml
Normal file
15
.vib/nessie-utils/goss/goss.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
# Copyright Broadcom, Inc. All Rights Reserved.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../nessie-utils/goss/nessie-utils.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: {}
|
||||
19
.vib/nessie-utils/goss/nessie-utils.yaml
Normal file
19
.vib/nessie-utils/goss/nessie-utils.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
# Copyright Broadcom, Inc. All Rights Reserved.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
command:
|
||||
check-cli-present:
|
||||
exec: java -jar /opt/bitnami/nessie-utils/nessie-cli/nessie-cli.jar --help
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "Statements to execute"
|
||||
check-gc-present:
|
||||
exec: java -jar /opt/bitnami/nessie-utils/nessie-gc/nessie-gc.jar --help
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "list-deferred"
|
||||
check-admin-tool-present:
|
||||
exec: java -jar /opt/bitnami/nessie-utils/nessie-server-admin-tool/quarkus-run.jar --help
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "erase-repository"
|
||||
15
.vib/nessie-utils/goss/vars.yaml
Normal file
15
.vib/nessie-utils/goss/vars.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
binaries:
|
||||
- java
|
||||
directories:
|
||||
- mode: "0775"
|
||||
paths:
|
||||
- /.nessie
|
||||
- paths:
|
||||
- /opt/bitnami/nessie-utils/nessie-cli
|
||||
- /opt/bitnami/nessie-utils/nessie-gc
|
||||
- /opt/bitnami/nessie-utils/nessie-server-admin-tool
|
||||
root_dir: /opt/bitnami
|
||||
# The application does not have a --version flag, but the server logs do show the version
|
||||
version:
|
||||
bin_name: java
|
||||
flag: -jar /opt/bitnami/nessie-utils/nessie-cli/nessie-cli.jar --version
|
||||
73
.vib/nessie-utils/vib-verify.json
Normal file
73
.vib/nessie-utils/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": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib"
|
||||
},
|
||||
"tests_file": "nessie-utils/goss/goss.yaml",
|
||||
"vars_file": "nessie-utils/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-nessie-utils"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
"threshold": "LOW",
|
||||
"vuln_type": [
|
||||
"OS"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "grype",
|
||||
"params": {
|
||||
"threshold": "CRITICAL",
|
||||
"package_type": [
|
||||
"OS"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
13
.vib/nessie/goss/goss.yaml
Normal file
13
.vib/nessie/goss/goss.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
# Copyright Broadcom, Inc. All Rights Reserved.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
gossfile:
|
||||
# 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: {}
|
||||
13
.vib/nessie/goss/vars.yaml
Normal file
13
.vib/nessie/goss/vars.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
binaries:
|
||||
- java
|
||||
directories:
|
||||
- mode: "0775"
|
||||
paths:
|
||||
- /bitnami/nessie/secrets
|
||||
- paths:
|
||||
- /opt/bitnami/nessie
|
||||
root_dir: /opt/bitnami
|
||||
# The application does not have a --version flag, but the server logs do show the version
|
||||
version:
|
||||
bin_name: timeout
|
||||
flag: --preserve-status 9 java -jar /opt/bitnami/nessie/quarkus-run.jar || true
|
||||
73
.vib/nessie/vib-verify.json
Normal file
73
.vib/nessie/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": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib"
|
||||
},
|
||||
"tests_file": "nessie/goss/goss.yaml",
|
||||
"vars_file": "nessie/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-nessie"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
"threshold": "LOW",
|
||||
"vuln_type": [
|
||||
"OS"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "grype",
|
||||
"params": {
|
||||
"threshold": "CRITICAL",
|
||||
"package_type": [
|
||||
"OS"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user