Feedback

Chat Icon

Cloud Native CI/CD with GitLab

From Commit to Production Ready

Workflows: Controlling Pipelines Execution
65%

Workflows Including Workflows

It's worth noting that workflows rules in the main .gitlab-ci.yml file always override the rules in included files. For example, you have this configuration in your .gitlab-ci.yml file:

# .gitlab-ci.yml
include:
  - local: .includes/job.yml

workflow:
  rules:
    - if: '$CI_COMMIT_BRANCH == "main"'

job-0:
  stage: build
  script:
    - 'echo "$CI_COMMIT_BRANCH"'

Cloud Native CI/CD with GitLab

From Commit to Production Ready

Enroll now to unlock all content and receive all future updates for free.