diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2019-05-24 15:34:54 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-05-24 15:34:54 +0000 |
commit | 21c809ce224696a811d6a557c601e6dc2eb27d2f (patch) | |
tree | f575dd5e531bc14a866c3be86ae902adab42ddc8 /.gitlab | |
parent | c0ea4164cdc21e831fbbfa9dee48a6fa2766d9fc (diff) | |
parent | 0c9b9a70f4f9bf6cbdb6df244f6c7532f4d3d532 (diff) | |
download | gitlab-ce-21c809ce224696a811d6a557c601e6dc2eb27d2f.tar.gz |
Merge branch '62151-broken-master' into 'master'
Fix MySQL CI jobs
Closes #62156 and #62151
See merge request gitlab-org/gitlab-ce!28593
Diffstat (limited to '.gitlab')
-rw-r--r-- | .gitlab/ci/rails.gitlab-ci.yml | 84 | ||||
-rw-r--r-- | .gitlab/ci/test-metadata.gitlab-ci.yml | 6 |
2 files changed, 73 insertions, 17 deletions
diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index 29534e40a14..3f0c899d704 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -6,8 +6,9 @@ .use-pg-10: &use-pg-10 services: - - postgres:10.7 - - redis:alpine + - name: postgres:10.7 + command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] + - name: redis:alpine .use-mysql: &use-mysql services: @@ -52,8 +53,10 @@ script: - JOB_NAME=( $CI_JOB_NAME ) - TEST_TOOL=${JOB_NAME[0]} - - export KNAPSACK_REPORT_PATH=knapsack/${CI_PROJECT_NAME}/${TEST_TOOL}_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json - - export KNAPSACK_GENERATE_REPORT=true + - TEST_LEVEL=${JOB_NAME[1]} + - DATABASE=${JOB_NAME[2]} + - export KNAPSACK_REPORT_PATH=knapsack/${CI_PROJECT_NAME}/${TEST_TOOL}_${TEST_LEVEL}_${DATABASE}_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json + - export KNAPSACK_GENERATE_REPORT=true KNAPSACK_LOG_LEVEL=debug KNAPSACK_TEST_DIR=spec - export SUITE_FLAKY_RSPEC_REPORT_PATH=${FLAKY_RSPEC_SUITE_REPORT_PATH} - export FLAKY_RSPEC_REPORT_PATH=rspec_flaky/all_${TEST_TOOL}_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json - export NEW_FLAKY_RSPEC_REPORT_PATH=rspec_flaky/new_${TEST_TOOL}_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json @@ -63,7 +66,10 @@ - '[[ -f $FLAKY_RSPEC_REPORT_PATH ]] || echo "{}" > ${FLAKY_RSPEC_REPORT_PATH}' - '[[ -f $NEW_FLAKY_RSPEC_REPORT_PATH ]] || echo "{}" > ${NEW_FLAKY_RSPEC_REPORT_PATH}' - scripts/gitaly-test-spawn - - knapsack rspec "--color --format documentation --format RspecJunitFormatter --out junit_rspec.xml" + - date + - 'export KNAPSACK_TEST_FILE_PATTERN=$(ruby -r./lib/quality/test_level.rb -e "puts Quality::TestLevel.new.pattern(:${TEST_LEVEL})")' + - knapsack rspec "--color --format documentation --format RspecJunitFormatter --out junit_rspec.xml --tag level:${TEST_LEVEL} --tag ~geo" + - date artifacts: expire_in: 31d when: always @@ -140,19 +146,68 @@ setup-test-env: except: - /(^docs[\/-].*|.*-docs$)/ -rspec-pg: +rspec unit pg: + <<: *rspec-metadata-pg + parallel: 20 + +rspec integration pg: <<: *rspec-metadata-pg - parallel: 50 + parallel: 6 + +rspec system pg: + <<: *rspec-metadata-pg + parallel: 24 + +rspec unit pg-10: + <<: *rspec-metadata-pg-10 + <<: *only-schedules-master + parallel: 20 + +rspec integration pg-10: + <<: *rspec-metadata-pg-10 + <<: *only-schedules-master + parallel: 6 -rspec-pg-10: +rspec system pg-10: <<: *rspec-metadata-pg-10 <<: *only-schedules-master - parallel: 50 + parallel: 24 -rspec-mysql: +rspec unit mysql: <<: *rspec-metadata-mysql <<: *only-schedules-master - parallel: 50 + parallel: 20 + +rspec integration mysql: + <<: *rspec-metadata-mysql + <<: *only-schedules-master + parallel: 6 + +rspec system mysql: + <<: *rspec-metadata-mysql + <<: *only-schedules-master + parallel: 24 + +.rspec-mysql-on-demand: &rspec-mysql-on-demand + only: + variables: + - $CI_COMMIT_MESSAGE =~ /\[run mysql\]/i + - $CI_COMMIT_REF_NAME =~ /mysql/ + +rspec unit mysql on-demand: + <<: *rspec-metadata-mysql + <<: *rspec-mysql-on-demand + parallel: 20 + +rspec integration mysql on-demand: + <<: *rspec-metadata-mysql + <<: *rspec-mysql-on-demand + parallel: 6 + +rspec system mysql on-demand: + <<: *rspec-metadata-mysql + <<: *rspec-mysql-on-demand + parallel: 24 rspec-fast-spec-helper: <<: *rspec-metadata-pg @@ -164,16 +219,17 @@ rspec-fast-spec-helper: script: - export CACHE_CLASSES=true - scripts/gitaly-test-spawn - - bin/rspec --color --format documentation --tag quarantine spec/ + - bin/rspec --color --format documentation --tag quarantine -- spec/ -rspec-pg-quarantine: +rspec quarantine pg: <<: *rspec-metadata-pg <<: *rspec-quarantine allow_failure: true -rspec-mysql-quarantine: +rspec quarantine mysql: <<: *rspec-metadata-mysql <<: *rspec-quarantine + <<: *only-schedules-master allow_failure: true static-analysis: diff --git a/.gitlab/ci/test-metadata.gitlab-ci.yml b/.gitlab/ci/test-metadata.gitlab-ci.yml index 4b595083ec6..c51f825f831 100644 --- a/.gitlab/ci/test-metadata.gitlab-ci.yml +++ b/.gitlab/ci/test-metadata.gitlab-ci.yml @@ -40,12 +40,12 @@ update-tests-metadata: policy: push script: - retry gem install fog-aws mime-types activesupport rspec_profiling postgres-copy --no-document - - scripts/merge-reports ${KNAPSACK_RSPEC_SUITE_REPORT_PATH} knapsack/${CI_PROJECT_NAME}/rspec-pg_node_*.json + - scripts/merge-reports ${KNAPSACK_RSPEC_SUITE_REPORT_PATH} knapsack/${CI_PROJECT_NAME}/rspec_*_pg_node_*.json + - '[[ -z ${TESTS_METADATA_S3_BUCKET} ]] || scripts/sync-reports put $TESTS_METADATA_S3_BUCKET $KNAPSACK_RSPEC_SUITE_REPORT_PATH' + - rm -f knapsack/${CI_PROJECT_NAME}/*_node_*.json - scripts/merge-reports ${FLAKY_RSPEC_SUITE_REPORT_PATH} rspec_flaky/all_*_*.json - FLAKY_RSPEC_GENERATE_REPORT=1 scripts/prune-old-flaky-specs ${FLAKY_RSPEC_SUITE_REPORT_PATH} - - '[[ -z ${TESTS_METADATA_S3_BUCKET} ]] || scripts/sync-reports put $TESTS_METADATA_S3_BUCKET $KNAPSACK_RSPEC_SUITE_REPORT_PATH' - '[[ -z ${TESTS_METADATA_S3_BUCKET} ]] || scripts/sync-reports put $TESTS_METADATA_S3_BUCKET $FLAKY_RSPEC_SUITE_REPORT_PATH' - - rm -f knapsack/${CI_PROJECT_NAME}/*_node_*.json - rm -f rspec_flaky/all_*.json rspec_flaky/new_*.json - scripts/insert-rspec-profiling-data only: |