From f86d5126722e1586c18fb0181e12b2f17e9d3d27 Mon Sep 17 00:00:00 2001 From: He Yin Ling Date: Sun, 24 Jun 2018 13:58:27 +0800 Subject: [PATCH] CI: remove test report stage: Test report is not used as expected: 1. we rarely download and use test report 2. current test report method doesn't handle large amount data well, need to be replaced by other methods Test report also make test jobs allow to fail. It breaks the original flow of Gitlab CI and make user confused. --- .gitlab-ci.yml | 56 -------------------------------------------------- 1 file changed, 56 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ecba98bdd2..46f2c9d92e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,6 @@ stages: - assign_test - unit_test - test - - test_report - deploy variables: @@ -277,60 +276,6 @@ test_build_system: - cd test_build_system - ${IDF_PATH}/tools/ci/test_build_system.sh -test_report: - stage: test_report - image: $CI_DOCKER_REGISTRY/esp32-ci-env - tags: - - report - only: - - master - - triggers - - /^release\/v/ - - /^v\d+\.\d+(\.\d+)?($|-)/ - variables: - LOG_PATH: "$CI_PROJECT_DIR/$CI_COMMIT_SHA" - TEST_CASE_FILE_PATH: "$CI_PROJECT_DIR/components/idf_test" - REPORT_PATH: "$CI_PROJECT_DIR/CI_Test_Report" - MODULE_UPDATE_FILE: "$CI_PROJECT_DIR/tools/unit-test-app/tools/ModuleDefinition.yml" - #dependencies: - #We need all UT* and IT* artifacts except for only a few other - artifacts: - when: always - paths: - - $REPORT_PATH - - $LOG_PATH - expire_in: 12 mos - script: - # calc log path - - VER_NUM=`git rev-list HEAD | wc -l | awk '{print $1}'` - - SHA_ID=`echo $CI_COMMIT_SHA | cut -c 1-7` - - REVISION="${VER_NUM}_${SHA_ID}" - # replace / to _ in branch name - - ESCAPED_BRANCH_NAME=`echo $CI_COMMIT_REF_NAME | sed 's/\//___/g'` - # result path and artifacts path - - RESULT_PATH="$CI_PROJECT_NAME/$ESCAPED_BRANCH_NAME/$REVISION" - - ARTIFACTS_PATH="$GITLAB_HTTP_SERVER/idf/esp-idf/builds/$CI_JOB_ID/artifacts/browse/$CI_COMMIT_SHA" - # clone test bench - - git clone $GITLAB_SSH_SERVER/yinling/auto_test_script.git - - cd auto_test_script - - python $CHECKOUT_REF_SCRIPT auto_test_script - # generate report - - TEST_RESULT=Pass - - python CITestReport.py -l $LOG_PATH -t $TEST_CASE_FILE_PATH -p $REPORT_PATH -r $RESULT_PATH -a $ARTIFACTS_PATH -m $MODULE_UPDATE_FILE || TEST_RESULT=Fail - # commit to CI-test-result project - - git clone $GITLAB_SSH_SERVER/qa/CI-test-result.git - - rm -rf "CI-test-result/RawData/$RESULT_PATH" - - cp -R $CI_PROJECT_NAME CI-test-result/RawData - - cd CI-test-result - # config git user - - git config --global user.email "ci-test-result@espressif.com" - - git config --global user.name "ci-test-result" - # commit test result - - git add . - - git commit . -m "update test result for $CI_PROJECT_NAME/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA, pipeline ID $CI_PIPELINE_ID" || exit 0 - - git push origin master - - test "${TEST_RESULT}" = "Pass" || exit 1 - push_master_to_github: stage: deploy image: $CI_DOCKER_REGISTRY/esp32-ci-env @@ -513,7 +458,6 @@ assign_test: - /^release\/v/ - /^v\d+\.\d+(\.\d+)?($|-)/ - triggers - allow_failure: true dependencies: - assign_test - build_ssc_00