default: interruptible: true include: - local: .gitlab/ci/package-and-test/rules.gitlab-ci.yml dont-interrupt-me: extends: .rules:dont-interrupt stage: test interruptible: false script: - echo "This jobs makes sure this pipeline won't be interrupted! See https://docs.gitlab.com/ee/ci/yaml/#interruptible." .run-tests: stage: test image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-bullseye-ruby-${RUBY_VERSION}:bundler-2.3-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION} services: - docker:${DOCKER_VERSION}-dind tags: - e2e before_script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - sysctl -n -w fs.inotify.max_user_watches=524288 variables: DOCKER_DRIVER: overlay2 DOCKER_HOST: tcp://docker:2375 QA_GDK_IMAGE: "${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-qa-gdk:master" QA_GENERATE_ALLURE_REPORT: "false" QA_CAN_TEST_PRAEFECT: "false" QA_INTERCEPT_REQUESTS: "false" QA_RUN_TYPE: e2e-test-on-gdk TEST_LICENSE_MODE: $QA_TEST_LICENSE_MODE EE_LICENSE: $QA_EE_LICENSE GITHUB_ACCESS_TOKEN: $QA_GITHUB_ACCESS_TOKEN GITLAB_QA_ADMIN_ACCESS_TOKEN: $QA_ADMIN_ACCESS_TOKEN QA_KNAPSACK_REPORTS: qa-smoke,ee-instance-parallel timeout: 2 hours artifacts: when: always paths: - test_output - logs expire_in: 7 days script: - echo -e "\e[0Ksection_start:`date +%s`:pull_image\r\e[0KPull GDK QA image" - docker pull ${QA_GDK_IMAGE} - echo -e "\e[0Ksection_end:`date +%s`:pull_image\r\e[0K" - echo -e "\e[0Ksection_start:`date +%s`:launch_gdk_and_tests\r\e[0KLaunch GDK and run QA tests" - cd qa && bundle install --jobs=$(nproc) --retry=3 --quiet - mkdir -p $CI_PROJECT_DIR/test_output $CI_PROJECT_DIR/logs/gdk $CI_PROJECT_DIR/logs/gitlab # This command matches the permissions of the user that runs GDK inside the container. - chown -R 1000:1000 $CI_PROJECT_DIR/test_output $CI_PROJECT_DIR/logs - | docker run --rm --name gdk --add-host gdk.test:127.0.0.1 --shm-size=2gb \ --env-file <(bundle exec rake ci:env_var_name_list) \ --volume /var/run/docker.sock:/var/run/docker.sock:z \ --volume $CI_PROJECT_DIR/test_output:/home/gdk/gdk/gitlab/qa/tmp:z \ --volume $CI_PROJECT_DIR/logs/gdk:/home/gdk/gdk/log \ --volume $CI_PROJECT_DIR/logs/gitlab:/home/gdk/gdk/gitlab/log \ ${QA_GDK_IMAGE} "${CI_COMMIT_SHA}" "$TEST_GDK_TAGS --tag ~requires_praefect" || true - echo -e "\e[0Ksection_end:`date +%s`:launch_gdk_and_tests\r\e[0K" allow_failure: true test-on-gdk-smoke: extends: - .run-tests parallel: 2 variables: TEST_GDK_TAGS: "--tag smoke" QA_KNAPSACK_REPORT_NAME: qa-smoke rules: - when: always test-on-gdk-full: extends: - .run-tests parallel: 5 variables: QA_KNAPSACK_REPORT_NAME: ee-instance-parallel rules: - when: manual