Difference between revisions of "GitLab rules:"
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
script: | script: | ||
- echo "Test" | - echo "Test" | ||
+ | |||
+ | |||
+ | 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 | ||
Revision as of 09:07, 26 August 2022
https://docs.gitlab.com/ee/ci/yaml/#rules
myjob: rules: - if: $CI_MERGE_REQUEST_ID when: always - when: never script: - echo "Test"
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
See also
Advertising: