2020-09-26 23:20:53 -04:00
|
|
|
.deploy_job_template:
|
2021-02-08 23:31:38 -05:00
|
|
|
extends: .before_script_no_sync_submodule
|
2019-06-28 12:39:21 -04:00
|
|
|
stage: deploy
|
2020-09-26 23:20:53 -04:00
|
|
|
image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
|
|
|
|
tags:
|
|
|
|
- deploy
|
2021-02-08 23:31:38 -05:00
|
|
|
dependencies: []
|
2020-09-26 23:20:53 -04:00
|
|
|
|
2019-06-28 12:39:21 -04:00
|
|
|
push_to_github:
|
2020-09-26 23:20:53 -04:00
|
|
|
extends:
|
|
|
|
- .deploy_job_template
|
2021-02-16 11:45:06 -05:00
|
|
|
- .before_script_minimal
|
2020-10-20 03:00:50 -04:00
|
|
|
- .rules:protected-no_label
|
2019-06-28 12:39:21 -04:00
|
|
|
script:
|
2020-09-26 23:20:53 -04:00
|
|
|
- add_github_ssh_keys
|
2019-06-28 12:39:21 -04:00
|
|
|
- git remote remove github &>/dev/null || true
|
|
|
|
- git remote add github git@github.com:espressif/esp-idf.git
|
|
|
|
- tools/ci/push_to_github.sh
|
|
|
|
|
|
|
|
deploy_test_result:
|
2020-09-26 23:20:53 -04:00
|
|
|
extends:
|
|
|
|
- .deploy_job_template
|
2021-02-22 07:44:11 -05:00
|
|
|
- .before_script_minimal
|
2020-10-20 03:00:50 -04:00
|
|
|
- .rules:ref:master-schedule-always
|
2019-06-28 12:39:21 -04:00
|
|
|
image: $CI_DOCKER_REGISTRY/bot-env
|
|
|
|
tags:
|
|
|
|
- deploy_test
|
|
|
|
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"
|
|
|
|
script:
|
2020-09-26 23:20:53 -04:00
|
|
|
- add_gitlab_ssh_keys
|
2019-06-28 12:39:21 -04:00
|
|
|
- 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
|
2020-07-15 00:00:03 -04:00
|
|
|
- rm -rf test-management
|
2020-09-28 02:27:10 -04:00
|
|
|
- retry_failed git clone $TEST_MANAGEMENT_REPO
|
2019-06-28 12:39:21 -04:00
|
|
|
- python3 $CHECKOUT_REF_SCRIPT test-management test-management
|
|
|
|
- cd 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}
|
2021-02-26 02:16:55 -05:00
|
|
|
|
|
|
|
check_submodule_sync:
|
|
|
|
extends:
|
|
|
|
- .deploy_job_template
|
|
|
|
- .rules:test:submodule
|
|
|
|
tags:
|
|
|
|
- github_sync
|
|
|
|
retry: 2
|
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: clone
|
|
|
|
SUBMODULES_TO_FETCH: "none"
|
|
|
|
PUBLIC_IDF_URL: "https://github.com/espressif/esp-idf.git"
|
|
|
|
script:
|
|
|
|
- git submodule deinit --force .
|
|
|
|
# setting the default remote URL to the public one, to resolve relative location URLs
|
|
|
|
- git config remote.origin.url ${PUBLIC_IDF_URL}
|
|
|
|
# check if all submodules are correctly synced to public repository
|
|
|
|
- git submodule init
|
|
|
|
- git config --get-regexp '^submodule\..*\.url$' || true
|
|
|
|
- git submodule update --recursive
|
|
|
|
- echo "IDF was cloned from ${PUBLIC_IDF_URL} completely"
|