From 2e3f500ff1718043196b3c049cd5942e38168b4c Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Mon, 2 Dec 2024 16:26:04 +0100 Subject: [PATCH] hack/generate-sast-tasks.sh: build sast-coverity-check.yaml --- hack/generate-sast-tasks.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 hack/generate-sast-tasks.sh diff --git a/hack/generate-sast-tasks.sh b/hack/generate-sast-tasks.sh new file mode 100755 index 0000000000..30ae9d4e7e --- /dev/null +++ b/hack/generate-sast-tasks.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +set -o posix + +shopt -s globstar nullglob + +HACK_DIR="$(realpath "$(dirname "${BASH_SOURCE[0]}")")" +ROOT_DIR="$(git rev-parse --show-toplevel)" +TASK_DIR="$(realpath "${ROOT_DIR}/task")" + +# sast-coverity-check of version 0.2 and newer uses kustomize to build the task +# definition from the buildah task and a locally maintained patch.yaml +for dir in "${TASK_DIR}/sast-coverity-check"/0.[2-9]; do ( + cd "$dir" && kustomize build > sast-coverity-check.yaml +) done