Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitlab change from only/except to rules for control ci, what will be alternative for it

Recently Git-lab change only/except to rules. so if i have below only in my .gitlab-ci.yaml, what will be equivalent rules for it.

  only:
    - merge_requests
    - triggers
like image 952
hsjvkshxkfkjdf Avatar asked Jan 18 '26 06:01

hsjvkshxkfkjdf


1 Answers

Use rules like this :

rules:
 - if: $CI_PIPELINE_SOURCE == "trigger" || $CI_PIPELINE_SOURCE == "merge_request_event"
   when: on_success
like image 158
Nicolas Pepinster Avatar answered Jan 19 '26 19:01

Nicolas Pepinster



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!