mirror of
https://github.com/bitnami/containers.git
synced 2026-03-06 06:58:01 +08:00
[bitnami/cloudnative-pg] ci: 👷 Add VIB files (#77074)
* [bitnami/cloudnative-pg] ci: 👷 Add VIB files Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com> * test: ✅ Add goss Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com> --------- Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com>
This commit is contained in:
committed by
GitHub
parent
6846ebed0b
commit
7f3b1f8e94
17
.vib/cloudnative-pg/goss/cloudnative-pg.yaml
Normal file
17
.vib/cloudnative-pg/goss/cloudnative-pg.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
command:
|
||||
check-cloudnative-pg-version:
|
||||
exec:
|
||||
- /manager
|
||||
- version
|
||||
exit-status: 0
|
||||
# Replace "-" with "+" in the version string
|
||||
stdout:
|
||||
- {{ .Env.APP_VERSION | replace "-" "+" }}
|
||||
check-cloudnative-pg-help:
|
||||
exec:
|
||||
- /manager
|
||||
- help
|
||||
exit-status: 0
|
||||
# Replace "-" with "+" in the version string
|
||||
stdout:
|
||||
- pgbouncer management
|
||||
9
.vib/cloudnative-pg/goss/goss.yaml
Normal file
9
.vib/cloudnative-pg/goss/goss.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
# Copyright Broadcom, Inc. All Rights Reserved.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../cloudnative-pg/goss/cloudnative-pg.yaml: {}
|
||||
# Load scripts from .vib/common/goss/templates
|
||||
../../common/goss/templates/check-ca-certs.yaml: {}
|
||||
../../common/goss/templates/check-files.yaml: {}
|
||||
7
.vib/cloudnative-pg/goss/vars.yaml
Normal file
7
.vib/cloudnative-pg/goss/vars.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
files:
|
||||
- mode: "0644"
|
||||
paths:
|
||||
- /opt/bitnami/cloudnative-pg/.spdx-cloudnative-pg.spdx
|
||||
- mode: "0755"
|
||||
paths:
|
||||
- /manager
|
||||
73
.vib/cloudnative-pg/vib-verify.json
Normal file
73
.vib/cloudnative-pg/vib-verify.json
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"context": {
|
||||
"resources": {
|
||||
"url": "{SHA_ARCHIVE}",
|
||||
"path": "{VIB_ENV_PATH}"
|
||||
},
|
||||
"runtime_parameters": "Y29tbWFuZDogWyIvc2hhcmVkL2J1c3lib3giLCAic2xlZXAiLCAiMzYwMCJdCg=="
|
||||
},
|
||||
"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": "cloudnative-pg/goss/goss.yaml",
|
||||
"vars_file": "cloudnative-pg/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-cloudnative-pg"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"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