From faaecc01944670f47b0a967560345ddbb0d18deb Mon Sep 17 00:00:00 2001
From: Tim Fechner <tim.fechner@hs-hannover.de>
Date: Thu, 28 Jul 2016 11:50:18 +0200
Subject: [PATCH] Move ci build task to master branch only

---
 .gitlab-ci.yml | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b88591d..a053f5b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -12,25 +12,25 @@ before_script:
 
 # build stage is the first stage
 
- build_staticfiles:
-     stage: build
-     script:
-         # Install nodejs
-         - curl -sL https://deb.nodesource.com/setup_4.x | sh > /dev/null 2>&1
-         - apt-get update -q && apt-get install -qq nodejs
-
-         # install & run gulp
-         - npm i gulp-cli --global > /dev/null
-         - npm i > /dev/null
-         - gulp build
-
-         # collect staticfiles
-         - python3 manage.py collectstatic --noinput
-
-     artifacts:
-         paths:
-             - static/
-         name: "staticfiles"
+build_staticfiles:
+    stage: build
+    only: [master]
+    script:
+        - curl -sL https://deb.nodesource.com/setup_4.x | sh > /dev/null 2>&1
+        - apt-get update -q && apt-get install -qq nodejs
+
+        # install & run gulp
+        - npm i gulp-cli --global > /dev/null
+        - npm i > /dev/null
+        - gulp build
+
+        # collect staticfiles
+        - python3 manage.py collectstatic --noinput
+
+    artifacts:
+        paths:
+            - static/
+        name: "staticfiles"
 
 # execute test stage jobs if build stage is completed successful
 
-- 
GitLab