Skip to content

Commit

Permalink
More robust jq and curl commands
Browse files Browse the repository at this point in the history
  • Loading branch information
amisstea committed Jun 25, 2024
1 parent 2822cb3 commit 140ff55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
set -eo pipefail
oc get secrets -l "$LABEL_SELECTOR" -o json \
| jq ".items[].metadata.namespace=\"$NAMESPACE\"" \
| jq --arg ns "$NAMESPACE" '.items[].metadata.namespace=$ns' \
| jq 'del(.items[] | .metadata.creationTimestamp,
.metadata.uid, .metadata.resourceVersion,
.metadata.annotations."kubectl.kubernetes.io/last-applied-configuration")' \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ spec:
set -eo pipefail
echo "GET $URL"
RESULT=$(curl -s -L -H "Accepts: application/json" $URL)
RESULT=$(curl -f -s -L -H "Accepts: application/json" $URL)
echo "$RESULT"
jq -j '.name' <<< "$RESULT" > $(step.results.version.path)

0 comments on commit 140ff55

Please sign in to comment.