簡體   English   中英

在 Camunda 部署中推送戰爭文件時出錯

[英]Getting error in pushing war files in Camunda Deployments

我已經在 EKS 集群上配置了 camunda 平台,現在我正在嘗試將我的 war 文件部署到我的 camunda 部署中,並且我是用於將 war 文件部署到部署中的 REST API 方法。 我正在使用 GitLab,所以我在 GitLab 中編寫了一個腳本來部署我的戰爭文件,但我在其中遇到了錯誤。 我在這里添加我的 GitLab 腳本和錯誤。 我有人對此過程有任何想法,請回復。 我在這個過程中被困了很長時間。

腳本:

    #   SCRIPT=`realpath $0`
    #   SCRIPTPATH=`dirname $SCRIPT`

    #   if [ -z "$CAMUNDA_DEPLOYMENT_ENDPOINT" ]; then
    #     CAMUNDA_DEPLOYMENT_ENDPOINT="my_camunda_url/engine-rest/deployment/create"
    #   fi
    #   if [ -z "$CAMUNDA_DEPLOYMENT_NAME" ]; then 
    #     CAMUNDA_DEPLOYMENT_NAME="rest-deployment"
    #   fi
    #   if [ -z "$CREDENTIALS_USERNAME" ]; then
    #     echo "Error: Username not set, please set the CREDENTIALS_USERNAME env variable."
    #     exit 1;
    #   fi
    #   if [ -z "$CREDENTIALS_PASSWORD" ]; then
    #     echo "Error: Password not set, please set the CREDENTIALS_PASSWORD env variable."
    #     exit 1;
    #   fi
    #   ENCODED_CREDENTIALS=$(echo -n "$CREDENTIALS_USERNAME:$CREDENTIALS_PASSWORD" | base64)

    #   echo "Deploying to $CAMUNDA_DEPLOYMENT_ENDPOINT"

    #   CURL_OPTS="curl --show-error --fail -v -F upload="./target/Alert.war" --request POST --url $CAMUNDA_DEPLOYMENT_ENDPOINT --header 'Content-Type: multipart/form-data' --header 'content-type: multipart/form-data;' --form deployment-name=$CAMUNDA_DEPLOYMENT_NAME "

    #   echo "Executing deployment request:"
    #   echo "------------------------------"

    #   echo "RESPONSE:"
    #   echo "------------------------------"
    #   echo "$CURL_OPTS"
    #   response=$(eval "$CURL_OPTS")
    #   echo "------------------------------"
    #   echo "$response";

錯誤:

$ SCRIPT=`realpath $0` # collapsed multi-line command
Deploying to my_camunda_url/engine-rest/deployment/create
Executing deployment request:
------------------------------
RESPONSE:
------------------------------
curl --show-error --http0.9 --fail -v -F upload=./target/Alert.war --request POST --url my_camunda_url/engine-rest/deployment/create --header 'Content-Type: multipart/form-data' --header 'content-type: multipart/form-data;' --form deployment-name=rest-deployment 
Note: Unnecessary use of -X or --request, POST is already inferred.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 13.235.39.166:80...
* Connected to my_camunda_url (13.235.39.166) port 80 (#0)
> POST /engine-rest/deployment/create HTTP/1.1
> Host: my_camunda_url
> User-Agent: curl/7.79.1
> Accept: */*
> Content-Length: 278
> Content-Type: multipart/form-data; boundary=------------------------1e3495ddaf12e92b
> 
} [278 bytes data]
* We are completely uploaded and fine
100   278    0     0  100   278      0   1355 --:--:-- --:--:-- --:--:--  1356* Mark bundle as not supporting multiuse
< HTTP/1.1 400 
< Date: Fri, 17 Jun 2022 06:49:54 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Connection: keep-alive
* The requested URL returned error: 400
100   278    0     0  100   278      0    670 --:--:-- --:--:-- --:--:--   669
* Closing connection 0
curl: (22) The requested URL returned error: 400

謝謝

您無法通過 Camunda API 部署完整的 WAR 文件。 創建部署時在您的多部分中發送 BPMN、DMN 或表單https://docs.camunda.org/manual/7.17/reference/rest/deployment/post-deployment/

如果您需要部署自定義字節碼,那么您要么需要將其包含在構建過​​程中(Camunda 7,例如 JavaDelegate),要么將其解耦並讓任務使用外部任務模式(C7 外部任務或 C8)來執行(您可能還想看看: https ://camunda.com/blog/2022/02/moving-from-embedded-to-remote-workflow-engines/)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM