Skip to content

Commit

Permalink
[bitnami/zipkin] chore: 👷 ✅ Add VIB tests (bitnami#71761)
Browse files Browse the repository at this point in the history
* [bitnami/zipkin] chore: 👷 ✅ Add VIB tests

Signed-off-by: Javier J. Salmerón García <[email protected]>

* chore: 🔧 Update references

Signed-off-by: Javier J. Salmerón García <[email protected]>

---------

Signed-off-by: Javier J. Salmerón García <[email protected]>
Signed-off-by: nenych <[email protected]>
  • Loading branch information
javsalgar authored and nenych committed Sep 3, 2024
1 parent 2d5b81f commit 8878127
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .vib/zipkin/goss/goss.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0

gossfile:
# Load scripts from .vib/common/goss/templates
../../zipkin/goss/zipkin.yaml: {}
../../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: {}
../../common/goss/templates/check-spdx.yaml: {}
11 changes: 11 additions & 0 deletions .vib/zipkin/goss/vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
binaries:
- java
- start-zipkin
directories:
- paths:
- /opt/bitnami/zipkin
root_dir: /opt/bitnami
# The application does not have a --version flag, but the server logs do show the version
version:
bin_name: timeout
flag: --preserve-status 7 bash -c "cd /opt/bitnami/zipkin; start-zipkin" || true
16 changes: 16 additions & 0 deletions .vib/zipkin/goss/zipkin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0

user:
zipkin:
exists: true
uid: 1001
gid: 0
command:
run-zipkin:
# We need a different port to not collide with the version check
exec: export QUERY_PORT=9044; cd /opt/bitnami/zipkin; timeout --preserve-status 12 start-zipkin 2>&1 || true
timeout: 15000
exit-status: 0
stdout:
- /Serving HTTP at.*9044/
73 changes: 73 additions & 0 deletions .vib/zipkin/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": "zipkin/goss/goss.yaml",
"vars_file": "zipkin/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-zipkin"
}
}
}
},
{
"action_id": "trivy",
"params": {
"threshold": "LOW",
"vuln_type": [
"OS"
]
}
},
{
"action_id": "grype",
"params": {
"threshold": "CRITICAL",
"package_type": [
"OS"
]
}
}
]
}
}
}

0 comments on commit 8878127

Please sign in to comment.