From 4e2944e515f7d94127fb9cea915f55f17103bdb0 Mon Sep 17 00:00:00 2001 From: Evelyn Schmidt Date: Mon, 19 Feb 2024 17:49:34 -0600 Subject: [PATCH] added ability to specify what version of cloud-workflows you want to pull, defualt is 1.1.4 --- manual-workflows/server_startup.py | 5 ++++- manual-workflows/start.sh | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/manual-workflows/server_startup.py b/manual-workflows/server_startup.py index 12d7380..0c95fca 100644 --- a/manual-workflows/server_startup.py +++ b/manual-workflows/server_startup.py @@ -89,7 +89,10 @@ def download_from_metadata(tag, dest_path): def clone_analysis_wdls(): old_dir = os.getcwd() os.chdir(SHARED_DIR) - status_code = os.system('git clone https://github.com/griffithlab/analysis-wdls.git') + release = _fetch_instance_info('analysis-release') + print(f"git clone https://github.com/wustl-oncology/analysis-wdls.git --branch v{release}") + + status_code = os.system(f"git clone https://github.com/wustl-oncology/analysis-wdls.git --branch v{release}") os.chdir(old_dir) if status_code != 0: raise Exception("Clone failed for griffithlab/analysis-wdls") diff --git a/manual-workflows/start.sh b/manual-workflows/start.sh index 8446d5c..377cfed 100644 --- a/manual-workflows/start.sh +++ b/manual-workflows/start.sh @@ -18,6 +18,7 @@ arguments: --workflow-options Local path to workflow_options.json. DEFAULT \$SRC_DIR/workflow_options.json --machine-type GCP machine type for the instance. DEFAULT e2-standard-2 --zone DEFAULT us-central1-c. For options, visit: https://cloud.google.com/compute/docs/regions-zones +--analysis-release DEFAULT 1.1.4. For options, visit: https://github.com/wustl-oncology/analysis-wdls/releases Additional arguments are passed directly to gsutil compute instances create command. For more information on those arguments, check that commands @@ -91,12 +92,20 @@ while test $# -gt 0; do ;; --zone*) if [ ! "$2" ]; then - ZONE="us-central1-c" + ZONE="us-central1-c" else ZONE=$2 shift fi ;; + --analysis-release*) + if [ ! "$2" ]; then + ANALYSIS_RELEASE="1.1.4" + else + ANALYSIS_RELEASE=$2 + shift + fi + ;; *) break ;; @@ -111,6 +120,7 @@ MACHINE_TYPE=${MACHINE_TYPE:-"e2-standard-2"} [ -z $CROMWELL_CONF ] && CROMWELL_CONF="$SRC_DIR/cromwell.conf" [ -z $WORKFLOW_OPTIONS ] && WORKFLOW_OPTIONS="$SRC_DIR/workflow_options.json" [ -z $ZONE ] && ZONE="us-central1-c" +[ -z $ANALYSIS_RELEASE ] && ANALYSIS_RELEASE="1.1.4" if [[ ! -f $CROMWELL_CONF ]]; then cat <