From ae1d54d81d857c8e15a51151917a513e6431ea01 Mon Sep 17 00:00:00 2001
From: Christian Boettcher <c.boettcher@fz-juelich.de>
Date: Wed, 13 Apr 2022 06:56:41 +0200
Subject: [PATCH] bring down old containers if possible

---
 .gitlab-ci.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 207132f..7752015 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -89,6 +89,7 @@ full-deploy-production:
     - pip install python-openstackclient
     - OLD_ID=`openstack server show $PRODUCTION_NAME -f value -c id` && server_exists=true || echo "No production server found. It might be a first time deployment"
     - if [ "$server_exists" = true ] ; then
+      ssh -oStrictHostKeyChecking=accept-new airflow@$PRODUCTION_IP "sudo docker-compose -f /home/airflow/data-logistics-service/dockers/docker-compose.yaml --project-directory /home/airflow/eflows-airflow down"
       openstack server set --name $OLD_PROD_NAME $OLD_ID;
       fi
     - openstack server remove volume $OLD_ID $VOLUME_ID
-- 
GitLab