aboutsummaryrefslogtreecommitdiffstats
path: root/run_test_deployment.sh
diff options
context:
space:
mode:
Diffstat (limited to 'run_test_deployment.sh')
-rwxr-xr-xrun_test_deployment.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/run_test_deployment.sh b/run_test_deployment.sh
new file mode 100755
index 0000000..1aa214f
--- /dev/null
+++ b/run_test_deployment.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+HOST="$1"
+
+[ -z "$HOST" ] && echo "only arg must be the test target's hostname" && exit 1
+
+
+JSON="$(st2 key get "$HOST" --json -a value | jq '.value' | head -c -2 | tail -c +2 | tr -d "\\")"
+echo "Got JSON $JSON"
+
+
+TEST_JOB="$(./generate_job.py "$JSON")"
+
+[ $? -gt 0 ] && echo "$TEST_JOB" && exit 1
+
+st2 key set "job_1" "$TEST_JOB"