@@ -35,15 +35,15 @@ if [ "{{workflow.parameters.tlsVerify}}" == "true" ]; then
3535fi
3636
3737# check resource exist.
38- status=$(curl -s -w "%{http_code}" -o /dev/null "$commonPath/resources/$resourceName" -X "GET" -H "Authorization: Bearer $token" $tlsVerify)
38+ status=$(curl -sS -w "%{http_code}" -o /dev/null "$commonPath/resources/$resourceName" -X "GET" -H "Authorization: Bearer $token" $tlsVerify)
3939# if status >= 200 and status < 300
4040if [ "$status" -ge 200 ] && [ "$status" -lt 300 ]; then
4141 jobType="upgrade"
4242fi
4343
4444# If jobType create resource.
4545if [ "$jobType" == "create" ]; then
46- response=$(curl -s "$commonPath/resources" -X "POST" -H "content-type: application/json" -H "Authorization: Bearer $token" -d '{{inputs.parameters.attributes}}' $tlsVerify)
46+ response=$(curl -sS "$commonPath/resources" -X "POST" -H "content-type: application/json" -H "Authorization: Bearer $token" -d '{{inputs.parameters.attributes}}' $tlsVerify)
4747 name=$(echo $response | jq -r '.name')
4848
4949 if [ "$name" == "null" ]; then
5454
5555# If jobType upgrade resource.
5656if [ "$jobType" == "upgrade" ]; then
57- status=$(curl -s -w "%{http_code}" -o /dev/null "$commonPath/resources/$resourceName/upgrade" -X "PUT" -H "content-type: application/json" -H "Authorization: Bearer $token" -d '{{inputs.parameters.attributes}}' $tlsVerify)
57+ status=$(curl -sS -w "%{http_code}" -o /dev/null "$commonPath/resources/$resourceName/upgrade" -X "PUT" -H "content-type: application/json" -H "Authorization: Bearer $token" -d '{{inputs.parameters.attributes}}' $tlsVerify)
5858
5959 # if not status >= 200 and status < 300
6060 if [ "$status" -lt 200 ] || [ "$status" -ge 300 ]; then
@@ -64,17 +64,17 @@ if [ "$jobType" == "upgrade" ]; then
6464fi
6565
6666# Get latest revision id
67- revisionResponse=$(curl -s "$commonPath/resources/$resourceName/revisions?page=1&perPage=1&sort=-createTime" -X GET -H "Authorization: Bearer $token" $tlsVerify)
67+ revisionResponse=$(curl -sS "$commonPath/resources/$resourceName/revisions?page=1&perPage=1&sort=-createTime" -X GET -H "Authorization: Bearer $token" $tlsVerify)
6868revisionID=$(echo $revisionResponse | jq -r '.items[0].id')
6969
7070# Watch service logs until the service finished.
71- curl -o - -s "$commonPath/resources/$resourceName/revisions/$revisionID/log?jobType=apply&watch=true" -X GET -H "Authorization: Bearer $token" $tlsVerify --compressed
71+ curl -o - -sS "$commonPath/resources/$resourceName/revisions/$revisionID/log?jobType=apply&watch=true" -X GET -H "Authorization: Bearer $token" $tlsVerify --compressed
7272
7373# Check revision status. wait until revision status is ready.
7474timeout=30
7575factor=1
7676while true; do
77- statusResponse=$(curl -s "$commonPath/resources/$resourceName/revisions/$revisionID" -X GET -H "Authorization: Bearer $token" $tlsVerify)
77+ statusResponse=$(curl -sS "$commonPath/resources/$resourceName/revisions/$revisionID" -X GET -H "Authorization: Bearer $token" $tlsVerify)
7878 statusSummary=$(echo $statusResponse | jq -r '.status.summaryStatus')
7979
8080 if [ "$statusSummary" == "Succeeded" ]; then
0 commit comments