From 451283e83b328beb1c20205335e33362c39de904 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20B=C3=B6ttcher?= <c.boettcher@fz-juelich.de>
Date: Mon, 15 May 2023 10:06:28 +0200
Subject: [PATCH] remove files in dags, but not directory itself

---
 scripts/deployment.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/deployment.sh b/scripts/deployment.sh
index 00410ff..ff1f39f 100755
--- a/scripts/deployment.sh
+++ b/scripts/deployment.sh
@@ -46,7 +46,7 @@ echo "Proceeding as user $(whoami)"
 # Make the necessary folders for the airflow artefacts and copy the corresponging content
 mkdir -p ./dags ./logs ./plugins ./config ./templates
 cd $GIT_REPO
-rm -rf $AIRFLOW_DIR/dags && mkdir $AIRFLOW_DIR/dags && git clone $DAG_GIT_URL $AIRFLOW_DIR/dags
+rm -rf $AIRFLOW_DIR/dags/{*,.[!.]*]} && git clone $DAG_GIT_URL $AIRFLOW_DIR/dags # rm contents of directory, but not directory itself, since this may cause issues with dag scheduler
 cp -r plugins/* $AIRFLOW_DIR/plugins
 cp config/* $AIRFLOW_DIR/config/
 cp -r templates/* $AIRFLOW_DIR/templates
-- 
GitLab