[bitnami/pytorch] Add VIB tests (#34147)

* [bitnami/pytorch] Add VIB tests

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Add trigger

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Remove trigger

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Remove duplicated test

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Revert pytorch version check

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

---------

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>
This commit is contained in:
Miguel Ruiz
2023-05-25 15:22:12 +02:00
committed by GitHub
parent 2d6525a27d
commit 14a23e12e7
5 changed files with 65 additions and 5 deletions
+11
View File
@@ -0,0 +1,11 @@
gossfile:
# Goss tests exclusive to the current container
../../pytorch/goss/pytorch.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-directories.yaml: {}
../../common/goss/templates/check-linked-libraries.yaml: {}
../../common/goss/templates/check-sed-in-place.yaml: {}
../../common/goss/templates/check-spdx.yaml: {}
+9
View File
@@ -0,0 +1,9 @@
command:
check-pytorch-version:
exec: python -c 'import torch; print(torch.__version__)'
exit-status: 0
stdout:
- {{ .Env.APP_VERSION }}
check-torchvision-version:
exec: python -c 'import torchvision; print(torchvision.__version__)'
exit-status: 0
+8
View File
@@ -0,0 +1,8 @@
binaries:
- python
directories:
- mode: "0775"
paths:
- /opt/bitnami/python
- /app
root_dir: /opt/bitnami
+20 -4
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": "pytorch/goss/goss.yaml",
"vars_file": "pytorch/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-pytorch"
}
}
}
},
{
"action_id": "trivy",
"params": {
@@ -64,9 +80,9 @@
"url": "{VIB_ENV_PACKAGES_JSON_URL}",
"path": "/{VIB_ENV_PATH}",
"authn": {
"header": "Authorization",
"token": "Bearer {VIB_ENV_GITHUB_TOKEN}"
}
"header": "Authorization",
"token": "Bearer {VIB_ENV_GITHUB_TOKEN}"
}
}
}
}
+17 -1
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": "pytorch/goss/goss.yaml",
"vars_file": "pytorch/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-pytorch"
}
}
}
},
{
"action_id": "trivy",
"params": {