]> git.eshelyaron.com Git - emacs.git/commitdiff
test/infra/gitlab-ci.yml: run only for tags and some branches
authorTed Zlatanov <tzz@lifelogs.com>
Sat, 16 Jan 2021 15:45:05 +0000 (15:45 +0000)
committerTed Zlatanov <tzz@lifelogs.com>
Sat, 16 Jan 2021 18:01:47 +0000 (18:01 +0000)
test/infra/gitlab-ci.yml

index d8934551b00c4db7957d9c27b140cc2c8b8b2635..f9c0e0c11ab74e736073f28046527b6141794b95 100644 (file)
 
 # Never run merge request pipelines, they usually duplicate push pipelines
 # see https://docs.gitlab.com/ee/ci/yaml/README.html#common-if-clauses-for-rules
+
+# Rules: always run tags and branches named master*, emacs*, feature*, fix*
+# Test that it triggers by pushing a tag: `git tag mytag; git push origin mytag`
+# Test that it triggers by pushing to: feature/emba, feature1, master, master-2, fix/emba, emacs-299, fix-2
+# Test that it doesn't trigger by pushing to: scratch-2, scratch/emba, oldbranch, dev
 workflow:
   rules:
     - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
       when: never
+    - if: '$CI_COMMIT_TAG'
+      when: always
+    - if: '$CI_COMMIT_BRANCH !~ /^(master|emacs|feature|fix)/'
+      when: never
     - when: always
 
 variables: