Skip to content

Commit

Permalink
fixing jq syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
ghoto committed Mar 16, 2021
1 parent 631ae0e commit 16cde17
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -o nounset
set -o errexit
#This script is used to check the status of the smoketest k8s job: the tests pass if {.status.succeeded} returns 1.
# Then retrieve the job logs once it's completed.
smoketest_k8s_job=$(kubectl -n tr-st-deploy get jobs -o json | jq -r ".items[] | select(.kind=='Job') | select(.metadata.labels.uploaderLabel=='${CI_COMMIT_SHORT_SHA}') | .metadata.name")
smoketest_k8s_job=$(kubectl -n tr-st-deploy get jobs -o json | jq -r --arg COMMIT "${CI_COMMIT_SHORT_SHA}" '.items[] | select(.kind=="Job") | select(.metadata.labels.uploaderLabel==$COMMIT) | .metadata.name')
echo >&2 "Create smoketest k8s job: $smoketest_k8s_job"
smoketest_k8s_pod=$(kubectl get pods -o custom-columns=:metadata.name | grep ${smoketest_k8s_job})
echo >&2 "Create smoketest k8s pod: $smoketest_k8s_pod"
Expand Down

0 comments on commit 16cde17

Please sign in to comment.