]> git.somenet.org - pub/jan/aic18.git/blob - camunda-deploy.sh
Add 'maven-wrapper.jar' because Docker image doesn't contain curl or wget.
[pub/jan/aic18.git] / camunda-deploy.sh
1 #!/bin/sh
2
3 camunda="http://localhost:8080"
4 camunda="http://127.0.0.1:8080"
5 camunda_deployment="${camunda}/engine-rest/deployment"
6
7 old_ids=`curl -s ${camunda_deployment}/ | python3 -c "import sys, json; doc = json.load(sys.stdin); items = [x['id'] for x in doc if x['name'] == 'Sentiment Analysis']; print (*items, sep = '\n')"`
8 for old_id in ${old_ids}; do
9         curl -s -X DELETE "${camunda_deployment}/${old_id}?cascade=true"
10 done
11 curl -i "${camunda_deployment}/create" -H "Expect:" -F "deployment-name=Sentiment Analysis" -F "sentiment_analysis.bpmn=@sentiment_analysis.bpmn"