diff options
author | Desiree Chevalier <dchevalier@gitlab.com> | 2019-06-07 08:46:48 -0400 |
---|---|---|
committer | Desiree Chevalier <dchevalier@gitlab.com> | 2019-07-17 10:12:56 -0400 |
commit | a1bee1a09d529007c4ff11ab55d355b51f352ed8 (patch) | |
tree | 84b200914385c2e62e73ba06b01537726b159269 /.gitlab | |
parent | b545cf4060101ea3490f0c05d4e69602a0e86879 (diff) | |
download | gitlab-ce-a1bee1a09d529007c4ff11ab55d355b51f352ed8.tar.gz |
Generate parallel spec reportsqa-review-knapsack-reports
Creates reports for parallel specs and collates them into a single
HTML report and displays results on the merge request.
Diffstat (limited to '.gitlab')
-rw-r--r-- | .gitlab/ci/review.gitlab-ci.yml | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/.gitlab/ci/review.gitlab-ci.yml b/.gitlab/ci/review.gitlab-ci.yml index ce019de213b..41d52c4e095 100644 --- a/.gitlab/ci/review.gitlab-ci.yml +++ b/.gitlab/ci/review.gitlab-ci.yml @@ -174,7 +174,38 @@ review-qa-all: script: - export KNAPSACK_REPORT_PATH=knapsack/${CI_PROJECT_NAME}/review-qa-all_master_report.json - export KNAPSACK_TEST_FILE_PATTERN=qa/specs/features/**/*_spec.rb - - gitlab-qa Test::Instance::Any "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}" + - gitlab-qa Test::Instance::Any "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}" -- --format RspecJunitFormatter --out tmp/rspec-${CI_JOB_ID}.xml --format html --out tmp/rspec.htm --color --format documentation + +parallel-spec-reports: + extends: .dedicated-runner + dependencies: + - review-qa-all + image: ruby:2.6-alpine + services: [] + before_script: [] + variables: + SETUP_DB: "false" + NEW_PARALLEL_SPECS_REPORT: qa/report-new.html + BASE_ARTIFACT_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/file/qa/" + stage: post-test + allow_failure: true + when: manual + retry: 0 + artifacts: + when: always + paths: + - qa/report-new.html + - qa/gitlab-qa-run-* + reports: + junit: qa/gitlab-qa-run-*/**/rspec-*.xml + script: + - apk add --update build-base libxml2-dev libxslt-dev && rm -rf /var/cache/apk/* + - gem install nokogiri + - cd qa/gitlab-qa-run-*/gitlab-* + - ARTIFACT_DIRS=$(pwd |rev| awk -F / '{print $1,$2}' | rev | sed s_\ _/_) + - cd ../../.. + - '[[ -f $NEW_PARALLEL_SPECS_REPORT ]] || echo "{}" > ${NEW_PARALLEL_SPECS_REPORT}' + - scripts/merge-html-reports ${NEW_PARALLEL_SPECS_REPORT} ${BASE_ARTIFACT_URL}${ARTIFACT_DIRS} qa/gitlab-qa-run-*/**/rspec.htm .review-performance-base: &review-performance-base <<: *review-qa-base |