[bitnami/dotnet] Add VIB tests (#24141)

* [bitnami/dotnet] Add VIB tests

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Remove VIB trigger

Signed-off-by: FraPazGal <fdepaz@vmware.com>

---------

Signed-off-by: FraPazGal <fdepaz@vmware.com>
This commit is contained in:
Francisco de Paz Galan 2023-02-17 09:57:36 +01:00 committed by GitHub
parent 22d7069bce
commit 6a837d7064
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 74 additions and 3 deletions

View File

@ -0,0 +1,17 @@
command:
check-bin-caps:
exec: getcap {{ .Vars.root_dir }}/dotnet/bin/dotnet
stdout:
- {{ .Vars.binary.capabilities }}
exit-status: 0
check-installed-runtimes:
exec: dotnet --list-runtimes
stdout:
- NETCore.App {{ .Env.APP_VERSION }}
exit-status: 0
file:
# Checks the postunpack phase properly creates the lib's symlink
/lib64/libz.so:
exists: true
filetype: symlink
linked-to: /usr/lib/libz.so.1

View File

@ -0,0 +1,11 @@
gossfile:
# Goss tests exclusive to the current container
../../dotnet/goss/dotnet.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: {}

View File

@ -0,0 +1,15 @@
binaries:
- dotnet
directories:
- paths:
- /app
mode: "0775"
- paths:
- /opt/bitnami/dotnet/bin/host
- /opt/bitnami/dotnet/bin/shared
root_dir: /opt/bitnami
version:
bin_name: dotnet
flag: --info
binary:
capabilities: cap_net_bind_service=eip

View File

@ -3,11 +3,25 @@
"resources": {
"url": "{VIB_ENV_CONTAINER_URL}",
"path": "{VIB_ENV_PATH}"
}
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
"actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "dotnet/goss/goss.yaml",
"vars_file": "dotnet/goss/vars.yaml",
"remote": {
"workload": "deploy-dotnet"
}
}
},
{
"action_id": "container-image-package",
"params": {

View File

@ -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": "dotnet/goss/goss.yaml",
"vars_file": "dotnet/goss/vars.yaml",
"remote": {
"workload": "deploy-dotnet"
}
}
},
{
"action_id": "trivy",
"params": {
@ -50,4 +64,4 @@
]
}
}
}
}