From 027a5e49b8ce8a796342c57869a8120a2a2c052b Mon Sep 17 00:00:00 2001
From: ralfulrich <ralf.ulrich@kit.edu>
Date: Thu, 6 Jun 2019 20:27:30 +0200
Subject: [PATCH] automatically run on master

---
 .gitlab-ci.yml | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 20bdd0d62..7012b72a3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -145,7 +145,8 @@ release-clang-8:
     - ctest -j4 
   when: manual    
 
-coverage: # special manual job to run after normal pipeline finished 
+# the coverage generation should either run when manually requested, OR for all changes on the master
+.coverage_job: &coverage_job
   image: corsika/devel:u-18.04
   dependencies:
     - config-u-18_04
@@ -164,8 +165,16 @@ coverage: # special manual job to run after normal pipeline finished
     expire_in: 1 year
     paths:
       - build/coverage-report.tar.gz
+
+coverage: # special manual job to run after normal pipeline finished 
+  <<: *coverage_job
   when: manual    
-  allow_failure: true
+
+coverage_master: # special job to run on master banch changes
+  <<: *coverage_job
+  only:
+    refs:
+      - master
 
 documentation:
   image: corsika/devel:u-18.04
-- 
GitLab