Skip to content

Commit

Permalink
[bitnami/notation] Add tests for notation
Browse files Browse the repository at this point in the history
Signed-off-by: sfelipe <[email protected]>
  • Loading branch information
fevisera committed Oct 16, 2023
1 parent ebc916e commit a33c95a
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .vib/notation/goss/goss.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0

gossfile:
# Goss tests exclusive to the current container
../../notation/goss/notation.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-linked-libraries.yaml: {}
../../common/goss/templates/check-sed-in-place.yaml: {}
../../common/goss/templates/check-spdx.yaml: {}
7 changes: 7 additions & 0 deletions .vib/notation/goss/notation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0

command:
generate-test-key:
exec: notation cert generate-test --default "wabbit-networks.io"
exit-status: 0
6 changes: 6 additions & 0 deletions .vib/notation/goss/vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
binaries:
- notation
root_dir: /opt/bitnami
version:
bin_name: notation
flag: version
73 changes: 73 additions & 0 deletions .vib/notation/vib-verify.json
Original file line number Diff line number Diff line change
@@ -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": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "notation/goss/goss.yaml",
"vars_file": "notation/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-notation"
}
}
}
},
{
"action_id": "trivy",
"params": {
"threshold": "CRITICAL",
"vuln_type": [
"OS"
]
}
},
{
"action_id": "grype",
"params": {
"threshold": "CRITICAL",
"package_type": [
"OS"
]
}
}
]
}
}
}

0 comments on commit a33c95a

Please sign in to comment.