File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,14 +57,15 @@ curl -sS -w "\n" -u $STENCIL_USERNAME:$STENCIL_PASSWORD -X PUT --fail "https://$
5757
5858ACTION=" Upload proto descriptor to stencil service with version number: $project_version "
5959log_info $ACTION
60- http_response=$( curl -s -o /tmp/stencil_out.txt -w " %{http_code}" -u $STENCIL_USERNAME :$STENCIL_PASSWORD -X POST " https://$STENCIL_HOSTNAME /v1/descriptors" -F " file=@$file_path " -F " version=$project_version " -F " name=$proto_repo " -F " latest=true" -H " Content-Type: multipart/form-data" )
60+ response_filename=" /tmp/stencil_out_$( cat /dev/urandom | base64 | tr -cd ' a-f0-9' | head -c 16 ) .txt"
61+ http_response=$( curl -s -o $response_filename -w " %{http_code}" -u $STENCIL_USERNAME :$STENCIL_PASSWORD -X POST " https://$STENCIL_HOSTNAME /v1/descriptors" -F " file=@$file_path " -F " version=$project_version " -F " name=$proto_repo " -F " latest=true" -H " Content-Type: multipart/form-data" )
6162if [ $? != 0 ]; then
6263 log_error " curl request failed"
6364 exit 1
6465elif [[ $http_response =~ ^[4-5][0-9][0-9]$ ]]; then
6566 log_error " status_code:" $http_response
66- log_error $( cat /tmp/stencil_out.txt )
67- rm /tmp/stencil_out.txt
67+ log_error $( cat $response_filename )
68+ rm $response_filename
6869 exit 1
6970fi
7071trap - EXIT
You can’t perform that action at this time.
0 commit comments