Difference between revisions of "GitLab rules:"

From wikieduonline
Jump to navigation Jump to search
m (Cry moved page Rules: to GitLab rules:)
Line 23: Line 23:
 
  [[!=]]  
 
  [[!=]]  
 
  [[==]]
 
  [[==]]
 +
 +
== Related ==
 +
* [[Prometheus, rules:]]
  
 
== See also ==
 
== See also ==

Revision as of 07:54, 23 September 2022

https://docs.gitlab.com/ee/ci/yaml/#rules

myjob:
   rules:
       - if: $CI_MERGE_REQUEST_ID
         when: always
       - when: never
   script:
       - echo "Test"

Official example (https://docs.gitlab.com/ee/ci/yaml/#rules):

docker build:
  script: docker build -t my-image:$CI_COMMIT_REF_SLUG .
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
      changes:
        - Dockerfile
      when: manual
      allow_failure: true


!= 
==

Related

See also

Advertising: