From f2feb4766e74cb528142f619b3fe8a0b4968938d Mon Sep 17 00:00:00 2001
From: TonyFord <tonyford@strategy-investor.de>
Date: Thu, 25 Jun 2020 12:22:22 +0200
Subject: [PATCH] add another stages

---
 .gitlab-ci.yml | 62 +++++++++++++++++++++++++++++++++++---------------
 1 file changed, 44 insertions(+), 18 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 28efaeb..b4bae8c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,47 +1,73 @@
 stages:
-  - clean
   - build
-  - restart
+  - start
+  - stop
+  - uninstall
+  - remove
 
-clean-blockchain-data:
-  stage: clean
+build-faircoind:
+  stage: build
   tags:
     - FairCoin.Co
   only:
     refs:
       - master
     variables:
-      - $CMD =~ /clean/
+      - $CMD =~ /build/
+  before_script:
+    - mkdir -p ~/.faircoin2
   script:
     - docker-compose down
-  after_script:
-    - echo ${CI_PROJECT_DIR} > ~/test.txt
-    - rm -R ~/.faircoin2
+    - docker-compose build
 
-build-faircoind:
-  stage: build
+start-faircoind:
+  stage: start
   tags:
     - FairCoin.Co
   only:
     refs:
       - master
     variables:
-      - $CMD =~ /build/
-  before_script:
-    - mkdir -p ~/.faircoin2
+      - $CMD =~ /build|start/
   script:
     - docker-compose down
-    - docker-compose build
+    - docker-compose up -d
 
-restart-faircoind:
-  stage: restart
+stop-faircoind:
+  stage: stop
   tags:
     - FairCoin.Co
   only:
     refs:
       - master
     variables:
-      - $CMD =~ /build|restart/
+      - $CMD =~ /stop/
+  script:
+    - docker-compose stop
+
+uninstall-faircoind:
+  stage: uninstall
+  tags:
+    - FairCoin.Co
+  only:
+    refs:
+      - master
+    variables:
+      - $CMD =~ /uninstall/
   script:
     - docker-compose down
-    - docker-compose up -d
+
+remove-faircoind:
+  stage: clean
+  tags:
+    - FairCoin.Co
+  only:
+    refs:
+      - master
+    variables:
+      - $CMD =~ /remove/
+  script:
+    - docker-compose down
+  after_script:
+    - echo ${CI_PROJECT_DIR} > ~/test.txt
+    - rm -R ~/.faircoin2
-- 
GitLab