FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 229d1e5e authored by L. Bower's avatar L. Bower
Browse files

modifying docker launch script to pass through optional args from command line

parent 85a3f9f4
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
set -e
upload=''
islive=''
clearup=''
component='not_set'
config='/storage/app/EWS_prod/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json' # default
rundate=$(date '+%Y%m%d') # default today
optionalArgs=""
SHORT=p:c:s:h
......@@ -29,15 +31,15 @@ do
shift 2
;;
--noupload )
optionalArgs="$optionalArgs --noupload"
upload="--noupload"
shift 2;
;;
--islive )
optionalArgs="$optionalArgs --islive"
islive="--islive"
shift 2;
;;
--clearup )
optionalArgs="$optionalArgs --clearup"
clearup="--clearup"
shift 2;
;;
-h | --help)
......@@ -58,7 +60,7 @@ done
function run_coordinator() {
printf "component: %s\nconfig: %s\nrundate: %s\n" "$component" "$config" "$rundate"
printf "optional args:\n%s\n" "$optionalArgs"
printf "optional args:\n%s\n" "$upload $islive $clearup"
docker container ls;
docker exec \
ews_runner \
......@@ -66,7 +68,9 @@ function run_coordinator() {
-p "$component" \
-c "$config" \
-s "$rundate" \
"$optionalArgs"
$upload \
$islive \
$clearup
}
run_coordinator
......@@ -4,7 +4,8 @@
source /storage/app/miniconda3/bin/activate /storage/app/EWS_prod/envs/conda/py3EWS/
PACKAGES_DIR="../../../../" # assumes run from the tests/integration/partial dir
# assumes run from the tests/integration/full dir, and that all necessary packages are checked out alongside
PACKAGES_DIR="../../../../"
flagdir=$PACKAGES_DIR/flagdir
epimodel=$PACKAGES_DIR/epimodel
......
......@@ -4,7 +4,8 @@
source /storage/app/miniconda3/bin/activate /storage/app/EWS_prod/envs/conda/py3EWS/
PACKAGES_DIR="../../../../" # assumes run from the tests/integration/partial dir
# assumes run from the tests/integration/partial dir, and that all necessary packages are checked out alongside
PACKAGES_DIR="../../../../"
flagdir=$PACKAGES_DIR/flagdir
epimodel=$PACKAGES_DIR/epimodel
......@@ -22,8 +23,3 @@ export PYTHONPATH=$PYTHONPATH:$flagdir:$epimodel:$advisory:$met_processing:$met_
echo $PYTHONPATH
python3 -m coverage run run_test_suite.py
#python3 -m unittest test_advisory.py
#python3 -m unittest test_deposition.py
#python3 -m unittest test_env_suit.py
#python3 -m unittest test_epi.py
#python3 -m unittest test_survey.py
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment