diff --git a/.gitlab/ci/base.yml b/.gitlab/ci/base.yml index 12b0a00d6..9a457e3c7 100644 --- a/.gitlab/ci/base.yml +++ b/.gitlab/ci/base.yml @@ -158,6 +158,15 @@ - <<: *docker_redis - <<: *docker_memcached +.rules_integration_manual_start: &rules_integration_manual_start + rules: + - if: $CI_MERGE_REQUEST_ID + when: never + - if: '$CI_COMMIT_BRANCH =~ /^private/ && $INTEGRATION_TESTS == null' + when: manual + allow_failure: true + - when: on_success + # we need at least one job to store and include this template # but we skip this via 'only' -> 'variables' -> '$IGNORE' # $IGNORE is not defined diff --git a/.gitlab/ci/integration.yml b/.gitlab/ci/integration.yml index f04117157..c0d2af68e 100644 --- a/.gitlab/ci/integration.yml +++ b/.gitlab/ci/integration.yml @@ -12,6 +12,7 @@ include: extends: - .env_base - .services_mysql_postgresql + - .rules_integration_manual_start tags: - integration stage: test diff --git a/.gitlab/ci/rspec.yml b/.gitlab/ci/rspec.yml index 3b161d298..90fbec16e 100644 --- a/.gitlab/ci/rspec.yml +++ b/.gitlab/ci/rspec.yml @@ -20,24 +20,12 @@ include: - bundle exec rake zammad:db:init - bundle exec rspec --exclude-pattern "spec/{system,integration}/**/*_spec.rb" -t ~searchindex -t db_strategy:reset -# RSpec 3rd party integration tests are independent of the database -# therefore we need only one job and choose a random database for each run - -.rspec_integration_rules: &rspec_integration_rules - rules: - - if: $CI_MERGE_REQUEST_ID - when: never - - if: '$CI_COMMIT_BRANCH =~ /^private/ && $INTEGRATION_TESTS == null' - when: manual - allow_failure: true - - when: on_success - rspec:integration: stage: test extends: - .env_base - .services_mysql_postgresql_redis_memcached - - .rspec_integration_rules + - .rules_integration_manual_start variables: RAILS_ENV: "test" script: