- echo "[document preview][en] $CI_DOCKER_REGISTRY/docs/esp-idf/en/${GIT_VER}/index.html"
- echo "[document preview][zh_CN] $CI_DOCKER_REGISTRY/docs/esp-idf/zh_CN/${GIT_VER}/index.html"
+update_test_cases:
+ stage: assign_test
+ image: $CI_DOCKER_REGISTRY/ubuntu-test-env
+ tags:
+ - deploy_test
+ only:
+ refs:
+ - master
+ - schedules
+ variables:
+ - $DEPLOY_TEST_RESULT_TO_JIRA == "Yes"
+ dependencies:
+ - build_esp_idf_tests_make
+ - build_esp_idf_tests_cmake
+ artifacts:
+ when: always
+ paths:
+ - ${CI_PROJECT_DIR}/test-management/*.log
+ expire_in: 1 week
+ variables:
+ UNIT_TEST_CASE_FILE: "${CI_PROJECT_DIR}/components/idf_test/unit_test/TestCaseAll.yml"
+ BOT_ACCOUNT_CONFIG_FILE: "${CI_PROJECT_DIR}/test-management/Config/Account.local.yml"
+ TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
+ AUTO_TEST_SCRIPT_PATH: "${CI_PROJECT_DIR}/auto_test_script"
+ PYTHON_VER: 3
+ script:
+ - export GIT_SHA=$(echo ${CI_COMMIT_SHA} | cut -c 1-8)
+ - git clone $TEST_MANAGEMENT_REPO
+ - cd test-management
+ - python $CHECKOUT_REF_SCRIPT test-management
+ - echo $BOT_JIRA_ACCOUNT > ${BOT_ACCOUNT_CONFIG_FILE}
+ # update unit test cases
+ - python ImportTestCase.py $JIRA_TEST_MANAGEMENT_PROJECT unity -d $UNIT_TEST_CASE_FILE -r $GIT_SHA
+ # update example test cases
+ - python ImportTestCase.py $JIRA_TEST_MANAGEMENT_PROJECT tiny_test_fw -d ${CI_PROJECT_DIR}/examples -r $GIT_SHA
+ # organize test cases
+ - python OrganizeTestCases.py $JIRA_TEST_MANAGEMENT_PROJECT
+
+deploy_test_result:
+ stage: deploy
+ image: $CI_DOCKER_REGISTRY/bot-env
+ tags:
+ - deploy_test
+ when: always
+ only:
+ variables:
+ - $DEPLOY_TEST_RESULT_TO_JIRA == "Yes"
+ artifacts:
+ when: always
+ paths:
+ - ${CI_PROJECT_DIR}/test-management/*.log
+ # save all test logs as artifacts, make it easier to track errors
+ - ${CI_PROJECT_DIR}/TEST_LOGS
+ - $CI_PROJECT_DIR/$CI_COMMIT_SHA
+ expire_in: 1 mos
+ variables:
+ UNIT_TEST_CASE_FILE: "${CI_PROJECT_DIR}/components/idf_test/unit_test/TestCaseAll.yml"
+ BOT_ACCOUNT_CONFIG_FILE: "${CI_PROJECT_DIR}/test-management/Config/Account.local.yml"
+ TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
+ AUTO_TEST_SCRIPT_PATH: "${CI_PROJECT_DIR}/auto_test_script"
+ before_script:
+ - mkdir -p ~/.ssh
+ - chmod 700 ~/.ssh
+ - echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64
+ - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
+ - chmod 600 ~/.ssh/id_rsa
+ - echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
+ script:
+ - export GIT_SHA=$(echo ${CI_COMMIT_SHA} | cut -c 1-8)
+ - export REV_COUNT=$(git rev-list --count HEAD)
+ - export SUMMARY="IDF CI test result for $GIT_SHA (r${REV_COUNT})"
+ # artifacts of job update_test_cases creates test-management folder
+ # we need to remove it so we can clone test-management folder again
+ - rm -r test-management
+ - git clone $TEST_MANAGEMENT_REPO
+ - cd test-management
+ - python3 $CHECKOUT_REF_SCRIPT test-management
+ - echo $BOT_JIRA_ACCOUNT > ${BOT_ACCOUNT_CONFIG_FILE}
+ # update test results
+ - python3 ImportTestResult.py -r "$GIT_SHA (r${REV_COUNT})" -j $JIRA_TEST_MANAGEMENT_PROJECT -s "$SUMMARY" -l CI -p ${CI_PROJECT_DIR}/TEST_LOGS ${CI_PROJECT_DIR}/${CI_COMMIT_SHA} --pipeline_url ${CI_PIPELINE_URL}
+
check_doc_links:
stage: host_test
image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG