From c22bc45db98499c3a523b6c3cd628de5f9690f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20J=2E=20Salmer=C3=B3n-Garc=C3=ADa?= Date: Fri, 2 Dec 2022 10:34:20 +0100 Subject: [PATCH] [bitnami/mastodon] wrench: :construction_worker: Add VIB integration (#15664) Signed-off-by: Javier Salmeron Garcia Signed-off-by: Javier Salmeron Garcia --- .vib/mastodon/vib-publish.json | 75 ++++++++++++++++++++++++++++++++++ .vib/mastodon/vib-verify.json | 53 ++++++++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 .vib/mastodon/vib-publish.json create mode 100644 .vib/mastodon/vib-verify.json diff --git a/.vib/mastodon/vib-publish.json b/.vib/mastodon/vib-publish.json new file mode 100644 index 000000000000..1375b480acf8 --- /dev/null +++ b/.vib/mastodon/vib-publish.json @@ -0,0 +1,75 @@ +{ + "context": { + "resources": { + "url": "{SHA_ARCHIVE}", + "path": "{VIB_ENV_PATH}" + } + }, + "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": "trivy", + "params": { + "threshold": "CRITICAL", + "vuln_type": [ + "OS" + ] + } + }, + { + "action_id": "grype", + "params": { + "threshold": "CRITICAL", + "package_type": [ + "OS" + ] + } + } + ] + }, + "publish": { + "actions": [ + { + "action_id": "container-image-publish", + "params": { + "metadata": { + "tags": {VIB_ENV_ROLLING_TAGS} + }, + "repository": { + "kind": "OCI", + "url": "{VIB_ENV_REGISTRY_URL}", + "username": "{VIB_ENV_REGISTRY_USERNAME}", + "password": "{VIB_ENV_REGISTRY_PASSWORD}" + } + } + } + ] + } + } +} diff --git a/.vib/mastodon/vib-verify.json b/.vib/mastodon/vib-verify.json new file mode 100644 index 000000000000..835cd556e241 --- /dev/null +++ b/.vib/mastodon/vib-verify.json @@ -0,0 +1,53 @@ +{ + "context": { + "resources": { + "url": "{SHA_ARCHIVE}", + "path": "{VIB_ENV_PATH}" + } + }, + "phases": { + "package": { + "actions": [ + { + "action_id": "container-image-package", + "params": { + "application": { + "details": { + "name": "{VIB_ENV_CONTAINER}", + "tag": "{VIB_ENV_TAG}" + } + } + } + }, + { + "action_id": "container-image-lint", + "params": { + "threshold": "error" + } + } + ] + }, + "verify": { + "actions": [ + { + "action_id": "trivy", + "params": { + "threshold": "CRITICAL", + "vuln_type": [ + "OS" + ] + } + }, + { + "action_id": "grype", + "params": { + "threshold": "CRITICAL", + "package_type": [ + "OS" + ] + } + } + ] + } + } +} \ No newline at end of file