From 1191b15340d9a8262c5821dbbcefe05e30ae84e0 Mon Sep 17 00:00:00 2001 From: Adam Cmiel Date: Wed, 24 Jul 2024 12:52:51 +0200 Subject: [PATCH] CI: avoid false-positive $(params.*) detection Previously, the yaml-lint task (the custom script that checks for $(params.*) usage) would flag false positives such as echo "set params.SOME_PARAM to do X" Make the regex match actual param usage more closely Signed-off-by: Adam Cmiel --- .tekton/tasks/yaml-lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tekton/tasks/yaml-lint.yaml b/.tekton/tasks/yaml-lint.yaml index 219da926b8..74c6b8c5ab 100644 --- a/.tekton/tasks/yaml-lint.yaml +++ b/.tekton/tasks/yaml-lint.yaml @@ -38,7 +38,7 @@ spec: script: | #!/bin/bash for task in $(find task -name '*.yaml'); do - if yq '.spec?.steps[] | .script' $task | grep -q 'params\.'; then + if yq '.spec?.steps[] | .script' $task | grep -q '\$(params\.'; then FAILED_TASKS="$FAILED_TASKS $task" fi done