File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,15 +55,15 @@ get_private_token() {
5555 --header " ${auth_header} " \
5656 " ${BTI_TOKEN_URL} " 2>&1
5757 ) "
58- http_status=" $( echo " ${bti_response} " | rg " HTTP_STATUS:" | sed ' s/HTTP_STATUS://' ) "
58+ http_status=" $( echo " ${bti_response} " | grep " HTTP_STATUS:" | sed ' s/HTTP_STATUS://' ) "
5959 response_body=" $( echo " ${bti_response} " | sed ' /HTTP_STATUS:/d' ) "
6060
6161 if [[ " ${http_status} " != " 200" ]]; then
6262 echo " BTI token request failed with status ${http_status} ." >&2
6363 return 1
6464 fi
6565
66- private_token=" $( echo " ${response_body} " | rg -o ' "token":"[^"]*"' | sed ' s/"token":"\([^"]*\)"/\1/' ) "
66+ private_token=" $( echo " ${response_body} " | grep -o ' "token":"[^"]*"' | sed ' s/"token":"\([^"]*\)"/\1/' ) "
6767 if [[ -z " ${private_token} " ]]; then
6868 echo " Failed to parse private token from BTI response." >&2
6969 return 1
@@ -122,7 +122,7 @@ list_matching_jobs() {
122122 --header " PRIVATE-TOKEN: ${private_token} " \
123123 " ${JOBS_API_URL} /pipelines/${pipeline_id} /jobs?scope[]=success&per_page=100" 2>&1
124124 ) "
125- http_status=" $( echo " ${response} " | rg " HTTP_STATUS:" | sed ' s/HTTP_STATUS://' ) "
125+ http_status=" $( echo " ${response} " | grep " HTTP_STATUS:" | sed ' s/HTTP_STATUS://' ) "
126126 response_body=" $( echo " ${response} " | sed ' /HTTP_STATUS:/d' ) "
127127
128128 if [[ " ${http_status} " != " 200" ]]; then
You can’t perform that action at this time.
0 commit comments