[bitnami/dotnet-sdk] Add VIB tests (#24143)

* [bitnami/dotnet-sdk] Add VIB tests

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

* Remove VIB trigger

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

* Add missing compilation tests

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

* Remove VIB trigger

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

* Implement additional test

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

* Adapt test to work in both supported majors

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

* Remove VIB trigger

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

* Update pipelines' DSL definitions

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-23 19:04:25 +01:00
committed by GitHub
parent 1b5764e74f
commit a4950cb286
5 changed files with 92 additions and 3 deletions

View File

@@ -0,0 +1,30 @@
command:
check-bin-caps:
exec: getcap {{ .Vars.root_dir }}/dotnet-sdk/bin/dotnet
stdout:
- {{ .Vars.binary.capabilities }}
exit-status: 0
check-installed-runtimes:
exec: dotnet --list-runtimes
stdout:
- AspNetCore.App
- NETCore.App
exit-status: 0
check-installed-sdks:
exec: dotnet --list-sdks
stdout:
- {{ .Env.APP_VERSION }}
exit-status: 0
create-dotnet-project:
exec: dotnet new -i CamundaProcessTemplate --force && dotnet new CamundaProcess -n VIBInstance --force
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
# Checks the permission change done at compilation
/opt/bitnami/dotnet-sdk/bin/sdk/{{ .Env.APP_VERSION }}/AppHostTemplate/apphost:
exists: true
mode: "0755"

View File

@@ -0,0 +1,11 @@
gossfile:
# Goss tests exclusive to the current container
../../dotnet-sdk/goss/dotnet-sdk.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,16 @@
binaries:
- dotnet
directories:
- paths:
- /app
mode: "0775"
- paths:
- /opt/bitnami/dotnet-sdk/bin/host
- /opt/bitnami/dotnet-sdk/bin/shared
- /opt/bitnami/dotnet-sdk/bin/sdk
root_dir: /opt/bitnami
version:
bin_name: dotnet
flag: --version
binary:
capabilities: cap_net_bind_service=eip

View File

@@ -3,7 +3,8 @@
"resources": {
"url": "{VIB_ENV_CONTAINER_URL}",
"path": "{VIB_ENV_PATH}"
}
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
@@ -32,6 +33,21 @@
},
"verify": {
"actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "dotnet-sdk/goss/goss.yaml",
"vars_file": "dotnet-sdk/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-dotnet-sdk"
}
}
}
},
{
"action_id": "trivy",
"params": {

View File

@@ -3,7 +3,8 @@
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "{VIB_ENV_PATH}"
}
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
@@ -29,6 +30,21 @@
},
"verify": {
"actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "dotnet-sdk/goss/goss.yaml",
"vars_file": "dotnet-sdk/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-dotnet-sdk"
}
}
}
},
{
"action_id": "trivy",
"params": {
@@ -50,4 +66,4 @@
]
}
}
}
}