From 500d5ba8b6b5ba8f2600bd87decba5de74e7ab65 Mon Sep 17 00:00:00 2001
From: Tamas Gal <tgal@km3net.de>
Date: Sun, 1 Mar 2020 12:06:06 +0100
Subject: [PATCH] Add test stage for non-master branches

---
 .gitlab-ci.yml | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 276c632..0a3103c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,12 +6,26 @@ variables:
   DOCKER_HOST: tcp://docker:2375
   DOCKER_DRIVER: overlay2
 
+stages:
+  - test
+  - publish
+
 
 before_script:
     - apk --no-cache add python git
 
+test:
+    stage: test
+    script:
+        - git diff-tree --no-commit-id --name-only -r HEAD
+        - python publish_images.py -q
+    tags:
+        - docker
+    except:
+        - master
 
-build:
+publish:
+    stage: publish
     script:
         - git diff-tree --no-commit-id --name-only -r HEAD
         - python publish_images.py
-- 
GitLab