Skip to content

Commit

Permalink
fix: titles and adding proper comments
Browse files Browse the repository at this point in the history
Signed-off-by: Leandro Mendes <[email protected]>
  • Loading branch information
theflockers committed Jan 15, 2025
1 parent 50f16e5 commit ac06cce
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Pipeline
metadata:
name: test-update-fbc-catalog-error
spec:
description: Test
description: Tests a production FBC release, but in a failure scenario
tasks:
- name: run-task
taskRef:
Expand All @@ -22,8 +22,6 @@ spec:
value: "[]"
- name: iibServiceAccountSecret
value: "iib-service-account-secret"
- name: subdirectory
value: $(context.pipelineRun.uid)
- name: check-result
params:
- name: jsonBuildInfo
Expand Down Expand Up @@ -66,14 +64,18 @@ spec:
exit 1
fi
# shellcheck disable=SC2046
# shellcheck disable=SC2046 # (warning): Quote this to prevent word splitting
# reason: wrapping the tekton parameters in the following line with double quotes is adding unwanted
# quotes to the contained json, breaking jq.
state="$(jq -cr '.state' <<< $(params.buildState))"
if [ "$state" != "failed" ]; then
echo "The task did not save a completed IIB build in buildState result"
exit 1
fi
# shellcheck disable=SC2046
# shellcheck disable=SC2046 # (warning): Quote this to prevent word splitting
# reason: wrapping the tekton parameters in the following line with double quotes is adding unwanted
# quotes to the contained json, breaking jq.
genericResult=$(jq -r \
'. |[.fbc_opt_in, .overwrite_fromindex_image, .publish_index_image,.sign_index_image] |@csv' \
<<< $(params.genericResult))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Pipeline
metadata:
name: test-update-fbc-catalog-hotfix
spec:
description: Test
description: Tests a hotfix FBC release
tasks:
- name: run-task
taskRef:
Expand All @@ -24,8 +24,6 @@ spec:
value: "iib-service-account-secret"
- name: hotfix
value: true
- name: subdirectory
value: $(context.pipelineRun.uid)
- name: check-result
params:
- name: jsonBuildInfo
Expand Down Expand Up @@ -68,7 +66,9 @@ spec:
exit 1
fi
# shellcheck disable=SC2046
# shellcheck disable=SC2046 # (warning): Quote this to prevent word splitting
# reason: wrapping the tekton parameters in the following line with double quotes is adding unwanted
# quotes to the contained json, breaking jq.
state="$(jq -cr '.state' <<< $(params.buildState))"
if [ "$state" != "complete" ]; then
echo "The task did not save a completed IIB build in buildState result"
Expand All @@ -86,7 +86,9 @@ spec:
exit 1
fi
# shellcheck disable=SC2046
# shellcheck disable=SC2046 # (warning): Quote this to prevent word splitting
# reason: wrapping the tekton parameters in the following line with double quotes is adding unwanted
# quotes to the contained json, breaking jq.
genericResult=$(jq -r \
'. |[.fbc_opt_in, .overwrite_fromindex_image, .publish_index_image, .sign_index_image] |@csv' \
<<< $(params.genericResult))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: test-update-fbc-catalog-default
name: test-update-fbc-catalog-prod
spec:
description: Test
description: Tests a production FBC release
tasks:
- name: run-task
taskRef:
Expand All @@ -22,8 +22,6 @@ spec:
value: "[]"
- name: iibServiceAccountSecret
value: "iib-service-account-secret"
- name: subdirectory
value: $(context.pipelineRun.uid)
- name: check-result
params:
- name: jsonBuildInfo
Expand Down Expand Up @@ -66,14 +64,18 @@ spec:
exit 1
fi
# shellcheck disable=SC2046
# shellcheck disable=SC2046 # (warning): Quote this to prevent word splitting
# reason: wrapping the tekton parameters in the following line with double quotes is adding unwanted
# quotes to the contained json, breaking jq.
state="$(jq -cr '.state' <<< $(params.buildState))"
if [ "$state" != "complete" ]; then
echo "The task did not save a completed IIB build in buildState result"
exit 1
fi
# shellcheck disable=SC2046
# shellcheck disable=SC2046 # (warning): Quote this to prevent word splitting
# reason: wrapping the tekton parameters in the following line with double quotes is adding unwanted
# quotes to the contained json, breaking jq.
genericResult=$(jq -r \
'. |[.fbc_opt_in, .overwrite_fromindex_image, .publish_index_image,.sign_index_image] |@csv' \
<<< $(params.genericResult))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Pipeline
metadata:
name: test-update-fbc-catalog-staged-index
spec:
description: Test
description: Tests a stage FBC release
tasks:
- name: run-task
taskRef:
Expand All @@ -24,8 +24,6 @@ spec:
value: "iib-service-account-secret"
- name: stagedIndex
value: true
- name: subdirectory
value: $(context.pipelineRun.uid)
- name: check-result
params:
- name: jsonBuildInfo
Expand Down Expand Up @@ -68,14 +66,18 @@ spec:
exit 1
fi
# shellcheck disable=SC2046
# shellcheck disable=SC2046 # (warning): Quote this to prevent word splitting
# reason: wrapping the tekton parameters in the following line with double quotes is adding unwanted
# quotes to the contained json, breaking jq.
state="$(jq -cr '.state' <<< $(params.buildState))"
if [ "$state" != "complete" ]; then
echo "The task did not save a completed IIB build in buildState result"
exit 1
fi
# shellcheck disable=SC2046
# shellcheck disable=SC2046 # (warning): Quote this to prevent word splitting
# reason: wrapping the tekton parameters in the following line with double quotes is adding unwanted
# quotes to the contained json, breaking jq.
genericResult=$(jq -r \
'. |[.fbc_opt_in, .overwrite_fromindex_image, .publish_index_image,.sign_index_image] |@csv' \
<<< $(params.genericResult))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Pipeline
metadata:
name: test-update-fbc-catalog-timeout
spec:
description: Test
description: Test a timed out FBC release
tasks:
- name: run-task
taskRef:
Expand All @@ -22,8 +22,6 @@ spec:
value: "[]"
- name: iibServiceAccountSecret
value: "iib-service-account-secret"
- name: subdirectory
value: $(context.pipelineRun.uid)
- name: buildTimeoutSeconds
value: 1
- name: check-result
Expand Down

0 comments on commit ac06cce

Please sign in to comment.