Commit 8900e521 authored by Alex Iribarren's avatar Alex Iribarren
Browse files

Delete testing jobs when we move to production

parent 20981fe9
Pipeline #522929 passed with stages
in 1 minute and 38 seconds
......@@ -16,6 +16,7 @@ stages:
- tag
- deploy_test
- deploy
- cleanup
prepare_dirs:
stage: prepare
......@@ -72,3 +73,15 @@ deploy:
script:
- *nomad_deps
- for j in *.nomad; do echo -e "\n${j}:"; nomad job run <(envsubst < $j); done
stop_testing:
stage: cleanup
dependencies:
- deploy
script:
- *nomad_deps
- export JOB_PREFIX="${DEV_JOB_PREFIX}"
- for j in *.nomad; do echo -e "\n${j}:"; JOB=`grep task <(envsubst < $j) | sed 's/.*"\([^"]*\)".*/\1/'`; nomad job stop -purge ${JOB}; done
only:
- tags
- master
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment