Commit 444478c7 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

refactor(rules): split complex rules

parent 1937ad0d
Loading
Loading
Loading
Loading
Loading
+15 −6
Original line number Diff line number Diff line
@@ -847,8 +847,11 @@ ansible-review:
    # exclude tags
    - if: $CI_COMMIT_TAG
      when: never
    # only on non-production, non-integration branches, with $ANSIBLE_REVIEW_PLAYBOOK_FILE set
    - if: '($ANSIBLE_REVIEW_PLAYBOOK_FILE != null && $ANSIBLE_REVIEW_PLAYBOOK_FILE != "") && $CI_COMMIT_REF_NAME !~ $PROD_REF && $CI_COMMIT_REF_NAME !~ $INTEG_REF'
    # exclude if $ANSIBLE_REVIEW_PLAYBOOK_FILE not set
    - if: '$ANSIBLE_REVIEW_PLAYBOOK_FILE == null || $ANSIBLE_REVIEW_PLAYBOOK_FILE == ""'
      when: never
    # only on non-production, non-integration branches
    - if: '$CI_COMMIT_REF_NAME !~ $PROD_REF && $CI_COMMIT_REF_NAME !~ $INTEG_REF'

# stop review env (only for branches)
ansible-cleanup-review:
@@ -902,8 +905,11 @@ ansible-integration:
    auto_stop_in: "$ANSIBLE_INTEG_AUTOSTOP_DURATION"
  resource_group: integration
  rules:
    # only on integration branch(es), with $ANSIBLE_INTEG_PLAYBOOK_FILE set
    - if: '($ANSIBLE_INTEG_PLAYBOOK_FILE != null && $ANSIBLE_INTEG_PLAYBOOK_FILE != "") && $CI_COMMIT_REF_NAME =~ $INTEG_REF'
    # exclude if $ANSIBLE_INTEG_PLAYBOOK_FILE not set
    - if: '$ANSIBLE_INTEG_PLAYBOOK_FILE == null || $ANSIBLE_INTEG_PLAYBOOK_FILE == ""'
      when: never
    # only on integration branch(es)
    - if: '$CI_COMMIT_REF_NAME =~ $INTEG_REF'


# stop integration env (only for branches)
@@ -955,8 +961,11 @@ ansible-staging:
    auto_stop_in: "$ANSIBLE_STAGING_AUTOSTOP_DURATION"
  resource_group: staging
  rules:
    # only on production branch(es), with $ANSIBLE_STAGING_PLAYBOOK_FILE set
    - if: '($ANSIBLE_STAGING_PLAYBOOK_FILE != null && $ANSIBLE_STAGING_PLAYBOOK_FILE != "") && $CI_COMMIT_REF_NAME =~ $PROD_REF'
    # exclude if $ANSIBLE_STAGING_PLAYBOOK_FILE not set
    - if: '$ANSIBLE_STAGING_PLAYBOOK_FILE == null || $ANSIBLE_STAGING_PLAYBOOK_FILE == ""'
      when: never
    # only on production branch(es)
    - if: '$CI_COMMIT_REF_NAME =~ $PROD_REF'


# stop staging env (only for branches)