trigger:e2e:
  trigger:
    include:
      - local: .gitlab/ci/pipelines/e2e.yaml
  stage: .post
  allow_failure: true
  needs:
    - job: docker
      artifacts: false
    - job: run
      artifacts: false
  rules:
    # if release tag always run e2e
    - if: '$CI_COMMIT_TAG && $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+/'
      when: on_success
    # if commit message contains [e2e] always deploy
    - if: '$CI_COMMIT_MESSAGE =~ /\[e2e\]/'
      when: on_success
    - if: '$CI_COMMIT_BRANCH =~ /^e2e\//'
      when: on_success
    # else only manual deploy
    - when: manual
