[bitnami/{cilium|cilium-operator}] Add VIB basic tests (#67017)

This commit is contained in:
Juan Ariza Toledano
2024-05-14 16:02:09 +02:00
committed by GitHub
parent de25f20626
commit b3b4e874cc
8 changed files with 218 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
command:
check-app-version:
exec: cilium-operator-generic version | grep "$(echo $APP_VERSION | sed -E 's|([0-9]+\.[0-9]+)\.0$|\1|g')"
exit-status: 0
check-cilium-operator-help:
exec: cilium-operator-generic help
exit-status: 0
stdout:
- "Usage"

View File

@@ -0,0 +1,13 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
gossfile:
# Goss tests exclusive to the current container
../../cilium/goss/cilium-operator.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-linked-libraries.yaml: {}
../../common/goss/templates/check-sed-in-place.yaml: {}
../../common/goss/templates/check-spdx.yaml: {}

View File

@@ -0,0 +1,8 @@
binaries:
- cilium-operator-aws
- cilium-operator-azure
- cilium-operator-generic
root_dir: /opt/bitnami
directories:
- paths:
- /opt/bitnami/cilium-operator

View 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": "trivy",
"params": {
"threshold": "LOW",
"vuln_type": [
"OS"
]
}
},
{
"action_id": "grype",
"params": {
"threshold": "CRITICAL",
"package_type": [
"OS"
]
}
},
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "cilium-operator/goss/goss.yaml",
"vars_file": "cilium-operator/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-cilium-operator"
}
}
}
}
]
}
}
}

View File

@@ -0,0 +1,12 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
command:
check-app-version:
exec: cilium-dbg version | grep "$(echo $APP_VERSION | sed -E 's|([0-9]+\.[0-9]+)\.0$|\1|g')"
exit-status: 0
check-cilium-help:
exec: cilium-dbg help
exit-status: 0
stdout:
- "Usage"

View File

@@ -0,0 +1,13 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
gossfile:
# Goss tests exclusive to the current container
../../cilium/goss/cilium.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-linked-libraries.yaml: {}
../../common/goss/templates/check-sed-in-place.yaml: {}
../../common/goss/templates/check-spdx.yaml: {}

View File

@@ -0,0 +1,14 @@
binaries:
- cilium
- cilium-agent
- cilium-bugtool
- cilium-dbg
- cilium-health
- cilium-health-responder
- cilium-mount
- cilium-sysctlfix
- loopback
root_dir: /opt/bitnami
directories:
- paths:
- /opt/bitnami/cilium

View 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": "trivy",
"params": {
"threshold": "LOW",
"vuln_type": [
"OS"
]
}
},
{
"action_id": "grype",
"params": {
"threshold": "CRITICAL",
"package_type": [
"OS"
]
}
},
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "cilium/goss/goss.yaml",
"vars_file": "cilium/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-cilium"
}
}
}
}
]
}
}
}