From 807b478719274072724daa2825626f6a79e13eb0 Mon Sep 17 00:00:00 2001 From: Mohd Uzair Date: Thu, 2 Nov 2023 11:16:07 +0530 Subject: [PATCH] Update uploadApplicationFile.sh --- uploadApplicationFile.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/uploadApplicationFile.sh b/uploadApplicationFile.sh index f57fcf2..56d2b32 100755 --- a/uploadApplicationFile.sh +++ b/uploadApplicationFile.sh @@ -4,17 +4,17 @@ # UPLOAD_TYPE: can be "Kubernetes Manifest" | "Helm Chart" | "Docker Compose" # PROVIDER_TOKEN: MESHERY provider token -# # get Meshery application file as escaped yaml str -MESHERY_APPLICATION_FILE=$(awk '{ gsub(/"/, "\\\"", $0); printf "%s\\n", $0}' __intermediate_file.yml) +# # get Meshery pattern file as escaped yaml str +MESHERY_PATTERN_FILE=$(awk '{ gsub(/"/, "\\\"", $0); printf "%s\\n", $0}' __intermediate_file.yml) # # convert to uri-encoded str UPLOAD_TYPE=$(printf %s "$UPLOAD_TYPE" | jq -sRr @uri) -curl "$MESHERY_SERVER_BASE_URL/api/application/$UPLOAD_TYPE" \ +curl "$MESHERY_SERVER_BASE_URL/api/pattern/$UPLOAD_TYPE" \ -H 'Accept: */*' \ -H 'Connection: close' \ -H 'Content-Type: text/plain;charset=UTF-8' \ -H "Cookie: meshery-provider=Meshery; token=$PROVIDER_TOKEN;" \ - --data-raw "{\"save\":true, \"application_data\": {\"application_file\":\"$MESHERY_APPLICATION_FILE\"}}" \ + --data-raw "{\"save\":true, \"pattern_data\": {\"pattern_file\":\"$MESHERY_APPLICATION_FILE\"}}" \ --compressed | jq ".[0].id"