From 66dd6a4cdd4cd8e2623cc045f01d6af6cd39f073 Mon Sep 17 00:00:00 2001
From: jrybicki-jsc <j.rybicki@fz-juelich.de>
Date: Thu, 16 Sep 2021 11:30:58 +0200
Subject: [PATCH] testdag for simple test in ci

---
 .gitlab-ci.yml  |  2 +-
 dags/testdag.py | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 dags/testdag.py

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 862ece7..39994fe 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,6 +23,6 @@ test:
    - cp dags/* /opt/airflow/dags/
    - airflow dags list 
    - airflow connections list
-   - airflow dags test firsto 2021-08-18
+   - airflow dags test testdag 2021-08-18
    - nosetests
 
diff --git a/dags/testdag.py b/dags/testdag.py
new file mode 100644
index 0000000..bcecf07
--- /dev/null
+++ b/dags/testdag.py
@@ -0,0 +1,21 @@
+from datetime import timedelta
+
+from airflow import DAG
+from airflow.operators.bash import BashOperator
+from airflow.utils.dates import days_ago
+
+def_args = {
+    'owner': 'airflow',
+    'depends_on_past': False,
+    'email_on_failure': False,
+    'email_on_retry': False,
+    'retries': 1,
+    'retry_delay': timedelta(minutes=5)
+
+}
+
+with DAG('firsto', default_args=def_args, description='first dag', schedule_interval=timedelta(days=1), start_date=days_ago(2)) as dag:
+    t1 = BashOperator(task_id='print_date', bash_command='date')
+    t2 = BashOperator(task_id='do_noting', bash_command='sleep 5')
+
+    t1 >> t2
-- 
GitLab