From a62f6cbe61919331c047d12889ecfc14c9123e7a Mon Sep 17 00:00:00 2001
From: lb584 <lb584@cam.ac.uk>
Date: Wed, 1 Feb 2023 17:42:39 +0000
Subject: [PATCH] adding custom date params to pipeline

---
 .gitlab-ci.yml                                | 37 ++++---------------
 configs/docker/run/runDockerEWS.sh            |  2 +-
 .../integration/full/full_test_deposition.py  |  2 +-
 3 files changed, 9 insertions(+), 32 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6e9f104..9fb8109 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -37,9 +37,14 @@ stages:
 
 .half_fat_before_script:
   before_script:
+
+      - echo "packages dir - " $PACKAGES_DIR
+      - echo "full-fat run date - " $FULL_FAT_RUN_DATE
+      - echo "custom full-fat run date - " $CUSTOM_RUN_DATE
+      - echo "pythonpath - " $PYTHONPATH
+
       - python3 -V  # Print out python version for debugging
       - pip install coverage
-      - echo $PACKAGES_DIR
       - mkdir $PACKAGES_DIR
       - mkdir $OUTPUT_DIR
       - git clone "https://nouser:$GROUP_WHEAT_ACCESS_VAR@gitlab.developers.cam.ac.uk/gilligan-epid/wheat-rusts/ews-source-generation.git" $PACKAGES_DIR/source_gen
@@ -61,7 +66,6 @@ stages:
       - coordinator=$CI_PROJECT_DIR/coordinator
       - coordinator_tests=$CI_PROJECT_DIR/tests
       - export PYTHONPATH=$PYTHONPATH:$coordinator:$coordinator_tests
-      - echo $PYTHONPATH
 
       - ls $PACKAGES_DIR
       - source /storage/app/miniconda3/bin/activate /storage/app/EWS_prod/envs/conda/py3EWS/
@@ -131,7 +135,7 @@ half_fat_epi_tests:
       - $CI_PROJECT_DIR/coverage
     expire_in: 10 days
 
-full_fat_tests:
+full_fat_depo:
   when: manual
   stage: full-fat
   extends: .half_fat_before_script
@@ -139,35 +143,8 @@ full_fat_tests:
   tags: ["ewas-production"]
   script:
     - >
-      
-      echo $FULL_FAT_RUN_DATE
-    
-      echo $CUSTOM_RUN_DATE
-
-      #echo $PYTHONPATH
-
-      #echo "this is a manual job"
-    
       cd $CI_PROJECT_DIR/tests/integration/full/
 
-      #ls
-      
-      #rm /storage/app/EWS_prod/regions/EastAfrica/workspace/DEPOSITION_20230126/STATUS_*
-    
-      #mkdir -p $OUTPUT_DIR/deposition_123445
-      
-      #touch $OUTPUT_DIR/deposition_123445/log.txt
-      
-      #echo "stuff" > $OUTPUT_DIR/deposition_123445/log.txt
-      
-      #mkdir $OUTPUT_DIR/survey_123445
-      
-      #touch $OUTPUT_DIR/survey_123445/log.txt
-      
-      #echo "stuff2" > $OUTPUT_DIR/survey_123445/log.txt
-
-      #echo $TEST_WORKSPACE_DIR
-
       python3 full_test_deposition.py 
       --config /storage/app/EWS_prod/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json
       --outdir $OUTPUT_DIR
diff --git a/configs/docker/run/runDockerEWS.sh b/configs/docker/run/runDockerEWS.sh
index 3fd000d..9e76122 100755
--- a/configs/docker/run/runDockerEWS.sh
+++ b/configs/docker/run/runDockerEWS.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 set -e
 
-#upload='--noupload' # default
+upload='--noupload' # default
 rundate=$(date '+%Y%m%d') # default today
 
 SHORT=p:,c:,s:,h
diff --git a/tests/integration/full/full_test_deposition.py b/tests/integration/full/full_test_deposition.py
index 626ddda..8f06e5a 100644
--- a/tests/integration/full/full_test_deposition.py
+++ b/tests/integration/full/full_test_deposition.py
@@ -10,7 +10,7 @@ from integration.partial.integration_test_utils import IntegrationTestUtils
 class TestFullDeposition(unittest.TestCase):
 
     TEST_OUT_PATH: str = "not_set"
-    TEST_START_DATE: str = '20230126'
+    TEST_START_DATE: str = 'NOT_SET'
     TEST_JOB_DIR: str = "DEPOSITION_" + TEST_START_DATE
 
 
-- 
GitLab