From e1270a2ebc72fec29653f449c260ebe247ab629f Mon Sep 17 00:00:00 2001
From: Varac <varac@varac.net>
Date: Thu, 8 Apr 2021 11:06:00 +0200
Subject: [PATCH] Always enable loki-stack, prom and eventrouter in CI

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

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 40f1883d9..9f6278480 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -47,13 +47,7 @@
 # using merge request pipelines (see https://gitlab.com/gitlab-org/gitlab/-/issues/326098)
 .eventrouter_rules:
   rules:
-    - changes:
-        - flux/**/$APP*.yaml
-        - ansible/roles/apps/templates/settings/$APP.yaml
-        - ansible/roles/apps/tasks/$APP.yaml
-    - if: '$TRIGGER_JOBS =~ /enable-eventrouter/'
-    - if: '$CI_COMMIT_MESSAGE =~ /TRIGGER_JOBS=.*enable-eventrouter/'
-    - if: '$CI_COMMIT_BRANCH == "master"'
+    - when: always
 
 .grafana_rules:
   rules:
@@ -66,6 +60,10 @@
     - if: '$CI_COMMIT_MESSAGE =~ /TRIGGER_JOBS=.*enable-grafana/'
     - if: '$CI_COMMIT_BRANCH == "master"'
 
+.loki_stack_rules:
+  rules:
+    - when: always
+
 .nextcloud_rules:
   rules:
     - changes:
@@ -79,14 +77,7 @@
 
 .prometheus_rules:
   rules:
-    - changes:
-      - flux/**/$APP*.yaml
-      - ansible/roles/apps/templates/settings/$APP.yaml
-      - ansible/roles/apps/tasks/$APP.yaml
-      - test/pytest/test_prometheus.py
-    - if: '$TRIGGER_JOBS =~ /enable-prometheus/'
-    - if: '$CI_COMMIT_MESSAGE =~ /TRIGGER_JOBS=.*enable-prometheus/'
-    - if: '$CI_COMMIT_BRANCH == "master"'
+    - when: always
 
 .rocketchat_rules:
   rules:
@@ -253,6 +244,13 @@ enable-grafana:
     - .enable_app_template
     - .grafana_rules
 
+enable-loki-stack:
+  variables:
+    APP: "loki-stack"
+  extends:
+    - .enable_app_template
+    - .loki_stack_rules
+
 enable-nextcloud:
   variables:
     APP: "nextcloud"
@@ -377,6 +375,13 @@ grafana-helm-release:
     - .helm-release
     - .grafana_rules
 
+loki-stack-helm-release:
+  variables:
+    APP: "loki-stack"
+  extends:
+    - .helm-release
+    - .loki_stack_rules
+
 nextcloud-helm-release:
   variables:
     APP: "nextcloud"
@@ -452,6 +457,15 @@ grafana-ready:
     - .apps-ready
     - .grafana_rules
 
+loki-stack-ready:
+  variables:
+    APP: "loki-stack"
+  needs:
+    - job: loki-stack-helm-release
+  extends:
+    - .apps-ready
+    - .loki_stack_rules
+
 nextcloud-ready:
   variables:
     APP: "nextcloud"
-- 
GitLab