From f4fc16f78a8727d943164566022cd428283b6127 Mon Sep 17 00:00:00 2001 From: Scott Hebert Date: Mon, 3 Feb 2025 13:22:49 -0500 Subject: [PATCH] feat(RELEASE-1387): fix yamllint errors Signed-off-by: Scott Hebert --- ...t-reduce-snapshot-disabled-single-component-mode.yaml | 6 ++++-- .../tests/test-reduce-snapshot-missing-resource.yaml | 6 ++++-- .../tests/test-reduce-snapshot-no-labels.yaml | 6 ++++-- .../test-reduce-snapshot-no-namespace-parameter.yaml | 9 ++++++--- .../tests/test-reduce-snapshot-wrong-component.yaml | 6 ++++-- .../reduce-snapshot/tests/test-reduce-snapshot.yaml | 9 ++++++--- 6 files changed, 28 insertions(+), 14 deletions(-) diff --git a/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-disabled-single-component-mode.yaml b/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-disabled-single-component-mode.yaml index b47eaaeda..2d6fc2f77 100644 --- a/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-disabled-single-component-mode.yaml +++ b/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-disabled-single-component-mode.yaml @@ -51,7 +51,8 @@ spec: kubectl apply -f snapshot mkdir -p "$(workspaces.data.path)/$(params.subdirectory)" - kubectl get snapshot/snapshot-sample -ojson | jq .spec | tee "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" + kubectl get snapshot/snapshot-sample -ojson | jq .spec | tee \ + "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" chmod 666 "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" - name: skip-trusted-artifact-operations image: quay.io/konflux-ci/release-service-utils:e633d51cd41d73e4b3310face21bb980af7a662f @@ -151,7 +152,8 @@ spec: set -eux cat "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" - if [ "$(jq '.components | length' < "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json")" -ne 2 ]; then + if [ "$(jq '.components | length' < "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json")" \ + -ne 2 ]; then echo "ERROR: Resulting snapshot does not contain 2 components" exit 1 fi diff --git a/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-missing-resource.yaml b/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-missing-resource.yaml index 3f0f79eab..95fa61ef1 100644 --- a/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-missing-resource.yaml +++ b/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-missing-resource.yaml @@ -52,7 +52,8 @@ spec: kubectl apply -f snapshot mkdir -p "$(workspaces.data.path)/$(params.subdirectory)" - kubectl get snapshot/snapshot-sample -ojson | jq .spec | tee "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" + kubectl get snapshot/snapshot-sample -ojson | jq .spec | tee \ + "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" chmod 666 "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" - name: skip-trusted-artifact-operations image: quay.io/konflux-ci/release-service-utils:e633d51cd41d73e4b3310face21bb980af7a662f @@ -152,7 +153,8 @@ spec: set -eux cat "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" - if [ "$(jq '.components | length' < "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json")" -ne 2 ]; then + if [ "$(jq '.components | length' < "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json")" \ + -ne 2 ]; then echo "ERROR: Resulting snapshot does not contain 2 components" exit 1 fi diff --git a/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-no-labels.yaml b/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-no-labels.yaml index 0d0e65abc..453628638 100644 --- a/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-no-labels.yaml +++ b/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-no-labels.yaml @@ -48,7 +48,8 @@ spec: kubectl apply -f snapshot mkdir -p "$(workspaces.data.path)/$(params.subdirectory)" - kubectl get snapshot/snapshot-sample -ojson | jq .spec | tee "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" + kubectl get snapshot/snapshot-sample -ojson | jq .spec | \ + tee "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" chmod 666 "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" - name: skip-trusted-artifact-operations image: quay.io/konflux-ci/release-service-utils:e633d51cd41d73e4b3310face21bb980af7a662f @@ -148,7 +149,8 @@ spec: set -eux cat "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" - if [ "$(jq '.components | length' < "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json")" -ne 2 ]; then + if [ "$(jq '.components | length' < "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json")" \ + -ne 2 ]; then echo "ERROR: Resulting snapshot does not contain 2 components" exit 1 fi diff --git a/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-no-namespace-parameter.yaml b/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-no-namespace-parameter.yaml index 270c4c0f2..3037acc8c 100644 --- a/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-no-namespace-parameter.yaml +++ b/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-no-namespace-parameter.yaml @@ -51,7 +51,8 @@ spec: kubectl apply -f snapshot mkdir -p "$(workspaces.data.path)/$(params.subdirectory)" - kubectl get snapshot/snapshot-sample -ojson | jq .spec | tee "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" + kubectl get snapshot/snapshot-sample -ojson | jq .spec | tee \ + "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" chmod 666 "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" - name: skip-trusted-artifact-operations image: quay.io/konflux-ci/release-service-utils:e633d51cd41d73e4b3310face21bb980af7a662f @@ -149,11 +150,13 @@ spec: set -eux cat "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" - if [ "$(jq '.components | length' < "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json")" -ne 1 ]; then + if [ "$(jq '.components | length' < "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json")" \ + -ne 1 ]; then echo "ERROR: Resulting snapshot does not contain 1 component" exit 1 fi - if [ "$(jq -cr '.components[0].name' < "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json")" != "tom" ]; then + if [ "$(jq -cr '.components[0].name' < "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json")" \ + != "tom" ]; then echo "ERROR: Resulting snapshot does not contain the 'tom' component" exit 1 fi diff --git a/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-wrong-component.yaml b/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-wrong-component.yaml index 3b4a2a8b3..0c78183ff 100644 --- a/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-wrong-component.yaml +++ b/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot-wrong-component.yaml @@ -52,7 +52,8 @@ spec: kubectl apply -f snapshot mkdir -p "$(workspaces.data.path)/$(params.subdirectory)" - kubectl get snapshot/snapshot-sample -ojson | jq .spec | tee "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" + kubectl get snapshot/snapshot-sample -ojson | jq .spec | tee \ + "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" chmod 666 "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" - name: skip-trusted-artifact-operations image: quay.io/konflux-ci/release-service-utils:e633d51cd41d73e4b3310face21bb980af7a662f @@ -152,7 +153,8 @@ spec: set -eux cat "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" - if [ "$(jq '.components | length' < "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json")" -ne 2 ]; then + if [ "$(jq '.components | length' < "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json")" \ + -ne 2 ]; then echo "ERROR: Resulting snapshot does not contain 2 components" exit 1 fi diff --git a/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot.yaml b/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot.yaml index 34e3999b0..9ff5ecac7 100644 --- a/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot.yaml +++ b/tasks/managed/reduce-snapshot/tests/test-reduce-snapshot.yaml @@ -51,7 +51,8 @@ spec: kubectl apply -f snapshot mkdir -p "$(workspaces.data.path)/$(params.subdirectory)" - kubectl get snapshot/snapshot-sample -ojson | jq .spec | tee "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" + kubectl get snapshot/snapshot-sample -ojson | jq .spec | tee \ + "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" chmod 666 "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" - name: skip-trusted-artifact-operations image: quay.io/konflux-ci/release-service-utils:e633d51cd41d73e4b3310face21bb980af7a662f @@ -151,11 +152,13 @@ spec: set -eux cat "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json" - if [ "$(jq '.components | length' < "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json")" -ne 1 ]; then + if [ "$(jq '.components | length' < "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json")" \ + -ne 1 ]; then echo "ERROR: Resulting snapshot does not contain 1 component" exit 1 fi - if [ "$(jq -cr '.components[0].name' < "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json")" != "tom" ]; then + if [ "$(jq -cr '.components[0].name' < "$(workspaces.data.path)/$(params.subdirectory)/snapshot.json")" \ + != "tom" ]; then echo "ERROR: Resulting snapshot does not contain the 'tom' component" exit 1 fi