From 37d1868e49fc47fd5e84a23353b643458a09527f Mon Sep 17 00:00:00 2001
From: Bartek Wrona <wrona@syncad.com>
Date: Fri, 17 Jul 2020 08:46:37 -0400
Subject: [PATCH] Update .gitlab-ci.yaml

---
 .gitlab-ci.yaml | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yaml b/.gitlab-ci.yaml
index 528f92940..9addfa2c1 100644
--- a/.gitlab-ci.yaml
+++ b/.gitlab-ci.yaml
@@ -71,6 +71,13 @@ hivemind_sync:
     - "echo Attempting to starting hive sync using hived node: $HIVEMIND_SOURCE_HIVED_URL . Max sync block is: $HIVEMIND_MAX_BLOCK"
     - echo Attempting to access database $DB_URL
     - ./local-site/bin/hive sync --test-max-block=$HIVEMIND_MAX_BLOCK --exit-after-sync --test-profile=False --steemd-url "$HIVEMIND_SOURCE_HIVED_URL" --database-url $DB_URL 2>&1 | tee -i hivemind-sync.log
+    - echo Attempting to start hive server listening on $HIVEMIND_HTTP_PORT port...
+    - if [ -f hive_server.pid ]; then kill -SIGINT `cat hive_server.pid`; fi;
+    - rm -f hive_server.pid
+    - screen -L -Logfile hive_server.log -dmS hive_server_$CI_JOB_ID ./local-site/bin/hive server --pid-file hive_server.pid --http-server-port $HIVEMIND_HTTP_PORT --steemd-url "$HIVEMIND_SOURCE_HIVED_URL" --database-url $DB_URL
+    - for i in `seq 1 10`; do if [ -f hive_server.pid ]; then break; else sleep 1; fi;  done
+    - cat hive_server.pid
+    
   artifacts:
     paths:
       - hivemind-sync.log
@@ -91,7 +98,7 @@ hivemind_start_server:
 
   script:
     - echo Attempting to start hive server listening on $HIVEMIND_HTTP_PORT port...
-    - if [ -f hive_server.pid ]; then kill -SIGINT `cat hive_server.pid` fi;
+    - if [ -f hive_server.pid ]; then kill -SIGINT `cat hive_server.pid`; fi;
     - rm -f hive_server.pid
     - screen -L -Logfile hive_server.log -dmS hive_server_$CI_JOB_ID ./local-site/bin/hive server --pid-file hive_server.pid --http-server-port $HIVEMIND_HTTP_PORT --steemd-url "$HIVEMIND_SOURCE_HIVED_URL" --database-url $DB_URL
     - for i in `seq 1 10`; do if [ -f hive_server.pid ]; then break; else sleep 1; fi;  done
@@ -102,5 +109,7 @@ hivemind_start_server:
       - hive_server.pid
     expire_in: 1 week
 
+  when: manual
+
   tags:
      - hivemind
-- 
GitLab