[odrs-web] ci: Define explicit rules for running tests as part of MR



commit 1bcdda096a1a51623ec19d53edf9b1f25f388796
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Thu Sep 1 07:54:42 2022 +0000

    ci: Define explicit rules for running tests as part of MR

 .gitlab-ci.yml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 178f035..6517752 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,11 +8,13 @@ stages:
 
 build-image:
   stage: test
-  needs: []
   extends:
     - .kaniko-root
   variables:
     CI_COMMIT_REF_PROTECTED: "false"
+  rules:
+    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
+    - if: $CI_PIPELINE_SOURCE == 'push'
 
 tests:
   stage: test
@@ -22,6 +24,9 @@ tests:
     - pip install -r requirements.txt
     - ODRS_REVIEWS_SECRET=not-secret4 python odrs/tests/util_test.py
     - python odrs/tests/odrs_test.py
+  rules:
+    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
+    - if: $CI_PIPELINE_SOURCE == 'push'
 
 deploy-dev:
   stage: deploy


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]