mirror of
https://github.com/bitnami/containers.git
synced 2026-02-21 07:17:26 +08:00
[bitnami/cosign] Add VIB tests (#26789)
* [bitnami/cosign] Add VIB tests Signed-off-by: FraPazGal <fdepaz@vmware.com> * Use custom version check and fix spdx test Signed-off-by: FraPazGal <fdepaz@vmware.com> * Improve spdx test sintax Signed-off-by: FraPazGal <fdepaz@vmware.com> * Remove VIB trigger Signed-off-by: FraPazGal <fdepaz@vmware.com> * Remove ending newlines Signed-off-by: FraPazGal <fdepaz@vmware.com> --------- Signed-off-by: FraPazGal <fdepaz@vmware.com>
This commit is contained in:
committed by
GitHub
parent
907ffda97e
commit
bd72e47e71
@@ -6,4 +6,4 @@ set -o pipefail
|
||||
|
||||
mapfile -t files < <( find /bitnami "$BITNAMI_ROOT_DIR" -name '.spdx-*.json' )
|
||||
|
||||
[[ ${#files[@]} -eq 0 ]] && exit 1
|
||||
[[ ${#files[@]} -gt 0 ]]
|
||||
|
||||
9
.vib/cosign/goss/cosign.yaml
Normal file
9
.vib/cosign/goss/cosign.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
command:
|
||||
check-app-version:
|
||||
exec: cosign version 2>&1
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- {{ .Env.APP_VERSION }}
|
||||
initialize-sigstore:
|
||||
exec: cosign initialize
|
||||
exit-status: 0
|
||||
10
.vib/cosign/goss/goss.yaml
Normal file
10
.vib/cosign/goss/goss.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../cosign/goss/cosign.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: {}
|
||||
3
.vib/cosign/goss/vars.yaml
Normal file
3
.vib/cosign/goss/vars.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
binaries:
|
||||
- cosign
|
||||
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,19 @@
|
||||
},
|
||||
"verify": {
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib"
|
||||
},
|
||||
"tests_file": "cosign/goss/goss.yaml",
|
||||
"vars_file": "cosign/goss/vars.yaml",
|
||||
"remote": {
|
||||
"workload": "deploy-cosign"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
"resources": {
|
||||
"url": "{SHA_ARCHIVE}",
|
||||
"path": "{VIB_ENV_PATH}"
|
||||
}
|
||||
},
|
||||
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
|
||||
},
|
||||
"phases": {
|
||||
"package": {
|
||||
@@ -29,6 +30,19 @@
|
||||
},
|
||||
"verify": {
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib"
|
||||
},
|
||||
"tests_file": "cosign/goss/goss.yaml",
|
||||
"vars_file": "cosign/goss/vars.yaml",
|
||||
"remote": {
|
||||
"workload": "deploy-cosign"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
@@ -50,4 +64,4 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user