forked from bitnami/containers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bitnami/zipkin] chore: 👷 ✅ Add VIB tests (bitnami#71761)
* [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
Showing
4 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |