Skip to content
Snippets Groups Projects
Verified Commit dd212210 authored by Mark's avatar Mark
Browse files

Refactor curl commands

parent b2375fe9
No related branches found
No related tags found
1 merge request!25Resolve "Make oAuth2 Client data persistent"
......@@ -51,11 +51,14 @@ spec:
command: ["/bin/bash", "-c"]
args:
- >
curl http://{{ $.Release.Name }}-hydra-admin:4445/health/ready \
--write-out "\nCheck Hydra health: HTTP %{http_code}" \
| tail -1 | grep 200 && echo "Hydra is ready to accept requests." && \
curl http://{{ $.Release.Name }}-hydra-admin:4445/clients/$CLIENT_NAME \
--silent \
--write-out "\n%{http_code}\n" \
--write-out "\nRequesting oauth client $CLIENT_NAME: HTTP %{http_code}\n" \
| tail -1 \
| grep -v 200 &&
| grep 404 &&
curl --header "Content-Type: application/json" \
--request POST \
--data "{\"client_id\": \"$CLIENT_ID\",
......@@ -70,7 +73,7 @@ spec:
\"token_endpoint_auth_method\": \"client_secret_post\"}" \
http://{{ $.Release.Name }}-hydra-admin:4445/clients \
--silent \
--write-out "\n%Creating oauth client $CLIENT_ID: HTTP(%{http_code})\n" \
--write-out "\nCreating oauth client $CLIENT_ID: HTTP(%{http_code})\n" \
| tail -1 \
| grep 201 &&
echo "Successfully created $CLIENT_ID"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment