Skip to content

Update rules for empty branches

Marcel Amirault requested to merge docs-skip-empty-branch-pipelines into master

What does this MR do?

Kamil pointed out that it's better to be strict with rules for empty branches, since it could block tag and scheduled pipelines, so this clarifies, making use of his comment in the linked issue.

I also pulls out all the additional rules examples into their own section, so that we can crosslink to them more easily (needed for the link from the workflow: rules section.

Related issues

Related to #15170 (comment 383659644)

Testing

Showing what gets 0000....:

Then, tested with:

workflow:
  rules:
    - when: always

always-runs-job:
  script:
    - export

dont-run-empty-branches:
  rules:
    - if: $CI_COMMIT_BRANCH && $CI_COMMIT_BEFORE_SHA != '0000000000000000000000000000000000000000'
  script:
    - export

dont-run-empty-MRs:
  rules:
  - if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_COMMIT_BEFORE_SHA != '0000000000000000000000000000000000000000'
  script:
    - export

Empty Branch pipeline:

Screen_Shot_2020-07-28_at_16.41.27

Empty Merge Request pipeline:

  • Does not create a pipeline until there are commits on the branch, so no need to filter these out!

Author's checklist (required)

Do not add the feature, frontend, backend, ~"bug", or database labels if you are only updating documentation. These labels will cause the MR to be added to code verification QA issues.

When applicable:

Review checklist

All reviewers can help ensure accuracy, clarity, completeness, and adherence to the Documentation Guidelines and Style Guide.

1. Primary Reviewer

  • Review by a code reviewer or other selected colleague to confirm accuracy, clarity, and completeness. This can be skipped for minor fixes without substantive content changes.

2. Technical Writer

  • Technical writer review. If not requested for this MR, must be scheduled post-merge. To request for this MR, assign the writer listed for the applicable DevOps stage.

3. Maintainer

  1. Review by assigned maintainer, who can always request/require the above reviews. Maintainer's review can occur before or after a technical writer review.
  2. Ensure a release milestone is set.
  3. If there has not been a technical writer review, create an issue for one using the Doc Review template.
Edited by Marcel Amirault

Merge request reports