Commit ed3af028 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

feat: adaptive pipeline

parent 6ec103d4
Loading
Loading
Loading
Loading
+30 −12
Original line number Diff line number Diff line
@@ -320,13 +320,20 @@ node-lint:
      - $NODE_PROJECT_DIR/reports/
    expire_in: 1 day
  rules:
    # exclude if $NODE_LINT_ENABLED not set
    # exclude if $NODE_LINT_ENABLED unset
    - if: '$NODE_LINT_ENABLED != "true"'
      when: never
    # on production or integration branches: auto
    # on production or integration branch(es): auto & failing
    - if: '$CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF'
    # else (development branches): auto & non-blocking
    - allow_failure: true
    # early stage (dev branch, no MR): manual & non-failing
    - if: '$CI_MERGE_REQUEST_ID == null && $CI_OPEN_MERGE_REQUESTS == null'
      when: manual
      allow_failure: true
    # Draft MR: auto & non-failing
    - if: '$CI_MERGE_REQUEST_TITLE =~ /^Draft:.*/'
      allow_failure: true
    # else (Ready MR): auto & failing
    - when: on_success

###############################################################################################
# Test stage: audit & outdated
@@ -352,13 +359,19 @@ node-audit:
      - $NODE_PROJECT_DIR/reports/
  rules:
    # exclude if $NODE_AUDIT_DISABLED set
    - if: $NODE_AUDIT_DISABLED == "true"
    - if: '$NODE_AUDIT_DISABLED == "true"'
      when: never
    # on production or intergation branch(es)
    # on production or integration branch(es): auto & failing
    - if: '$CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF'
    # on non-production, non-integration branches: manual & non-blocking
    - when: manual
    # early stage (dev branch, no MR): manual & non-failing
    - if: '$CI_MERGE_REQUEST_ID == null && $CI_OPEN_MERGE_REQUESTS == null'
      when: manual
      allow_failure: true
    # Draft MR: auto & non-failing
    - if: '$CI_MERGE_REQUEST_TITLE =~ /^Draft:.*/'
      allow_failure: true
    # else (Ready MR): auto & failing
    - when: on_success

# outdated
node-outdated:
@@ -380,11 +393,16 @@ node-outdated:
      - $NODE_PROJECT_DIR/reports/
  rules:
    # exclude if $NODE_OUTDATED_DISABLED set
    - if: $NODE_OUTDATED_DISABLED == "true"
    - if: '$NODE_OUTDATED_DISABLED == "true"'
      when: never
    # on production or integration branch(es): auto & non-blocking
    # on production or integration branch(es): auto & failing
    - if: '$CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF'
    # early stage (dev branch, no MR): manual & non-failing
    - if: '$CI_MERGE_REQUEST_ID == null && $CI_OPEN_MERGE_REQUESTS == null'
      when: manual
      allow_failure: true
    # on non-production, non-integration branches: manual & non-blocking
    - when: manual
    # Draft MR: auto & non-failing
    - if: '$CI_MERGE_REQUEST_TITLE =~ /^Draft:.*/'
      allow_failure: true
    # else (Ready MR): auto & failing
    - when: on_success