Skip to content

Commit

Permalink
feat(RELEASE-1387): fix yamllint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Hebert <scoheb@gmail.com>
  • Loading branch information
scoheb committed Feb 3, 2025
1 parent 010c347 commit 7764841
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions tasks/managed/reduce-snapshot/tests/test-reduce-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7764841

Please sign in to comment.