Piotr Jaszczyk | 6768940 | 2018-06-14 09:48:46 +0200 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Usage: source ./development.sh and use functions defined here |
| 4 | # https://httpie.org/ is required for API calls |
| 5 | |
| 6 | export MAVEN_OPTS="-T1C" |
| 7 | |
| 8 | function veshv_full_rebuild() { |
| 9 | mvn clean install -Panalysis ${MAVEN_OPTS} |
| 10 | } |
| 11 | |
| 12 | function veshv_rebuild() { |
| 13 | mvn clean install ${MAVEN_OPTS} |
| 14 | } |
| 15 | |
| 16 | function veshv_build() { |
| 17 | mvn install ${MAVEN_OPTS} |
| 18 | } |
| 19 | |
| 20 | function veshv_fast_build() { |
| 21 | mvn install -DskipTests ${MAVEN_OPTS} |
| 22 | } |
| 23 | |
| 24 | function veshv_docker_start() { |
| 25 | docker-compose down |
| 26 | docker-compose rm -f |
| 27 | docker-compose up |
| 28 | } |
| 29 | |
| 30 | function veshv_docker_clean() { |
| 31 | docker volume prune |
| 32 | } |
| 33 | |
| 34 | function veshv_build_and_start() { |
| 35 | veshv_fast_build && veshv_docker_start |
| 36 | } |
| 37 | |
| 38 | function veshv_fresh_restart() { |
| 39 | docker-compose down |
| 40 | docker-compose rm -f |
| 41 | veshv_docker_clean |
| 42 | veshv_fast_build && docker-compose up |
| 43 | } |
| 44 | |
| 45 | function veshv_simul_dcaeapp_count() { |
| 46 | http --json GET http://localhost:8100/messages/count |
| 47 | } |
| 48 | |
| 49 | function veshv_simul_dcaeapp_last_key() { |
| 50 | http --json GET http://localhost:8100/messages/last/key |
| 51 | } |
| 52 | |
| 53 | function veshv_simul_dcaeapp_last_value() { |
| 54 | http --json GET http://localhost:8100/messages/last/value |
| 55 | } |
| 56 | |
| 57 | function veshv_simul_client() { |
| 58 | # feed me with json file using "<" |
| 59 | http --json POST http://localhost:8000/simulator/sync |
| 60 | } |
| 61 | |
| 62 | function veshv_simul_client_async() { |
| 63 | # feed me with json file using "<" |
| 64 | http --json POST http://localhost:8000/simulator/async |
| 65 | } |
| 66 | |