Skip to content

Commit

Permalink
Merge pull request #770 from lcarva/fix-yamllint
Browse files Browse the repository at this point in the history
Fix yamllint
  • Loading branch information
lcarva authored Jan 30, 2024
2 parents a316c8e + 61a4f96 commit 970ca0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .tekton/tasks/yaml-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,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
Expand Down
6 changes: 4 additions & 2 deletions task/tkn-bundle/0.1/tkn-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ spec:
env:
- name: CONTEXT
value: $(params.CONTEXT)
- name: STEPS_IMAGE
value: $(params.STEPS_IMAGE)
script: |
#!/bin/env bash
set -o errexit
Expand Down Expand Up @@ -100,9 +102,9 @@ spec:
fi
done
if [[ -n "$(params.STEPS_IMAGE)" ]]; then
if [[ -n "${STEPS_IMAGE}" ]]; then
for f in "${FILES[@]}"; do
yq e '(.spec.steps[] | select(has("image")).image) = "$(params.STEPS_IMAGE)"' -i $f
yq e '(.spec.steps[] | select(has("image")).image) = "env(STEPS_IMAGE)"' -i $f
done
fi
Expand Down

0 comments on commit 970ca0e

Please sign in to comment.