2020-09-26 23:20:53 -04:00
|
|
|
.deploy_job_template:
|
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
|
|
|
|
|
|
|
|
.clang_tidy_deploy_template:
|
|
|
|
extends: .deploy_job_template
|
2019-06-28 12:39:21 -04:00
|
|
|
tags:
|
|
|
|
- deploy
|
2020-01-10 05:36:52 -05:00
|
|
|
- shiny
|
2019-06-28 12:39:21 -04:00
|
|
|
script:
|
2020-09-26 23:20:53 -04:00
|
|
|
- add_doc_server_ssh_keys $DOCS_DEPLOY_KEY $DOCS_SERVER $DOCS_SERVER_USER
|
2019-06-28 12:39:21 -04:00
|
|
|
- export GIT_VER=$(git describe --always)
|
|
|
|
- cd $IDF_PATH/examples/get-started/hello_world/tidybuild
|
|
|
|
- mv report $GIT_VER
|
|
|
|
- tar czvf $GIT_VER.tar.gz $GIT_VER
|
|
|
|
- export STATIC_REPORT_PATH="web/static_analysis/esp-idf/"
|
|
|
|
- ssh $DOCS_SERVER -x "mkdir -p $STATIC_REPORT_PATH/clang-tidy"
|
|
|
|
- scp $GIT_VER.tar.gz $DOCS_SERVER:$STATIC_REPORT_PATH/clang-tidy
|
|
|
|
- ssh $DOCS_SERVER -x "cd $STATIC_REPORT_PATH/clang-tidy && tar xzvf $GIT_VER.tar.gz && rm -f latest && ln -s $GIT_VER latest"
|
|
|
|
# add link to view the report
|
|
|
|
- echo "[static analysis][clang tidy] $CI_DOCKER_REGISTRY/static_analysis/esp-idf/clang-tidy/${GIT_VER}/index.html"
|
|
|
|
- test ! -e ${GIT_VER}/FAILED_RULES || { echo 'Failed static analysis rules!'; cat ${GIT_VER}/FAILED_RULES; exit 1; }
|
|
|
|
|
|
|
|
clang_tidy_deploy:
|
|
|
|
extends: .clang_tidy_deploy_template
|
2020-06-09 23:32:43 -04:00
|
|
|
# Override default stage to happen before the post_check
|
|
|
|
stage: test_deploy
|
2020-09-26 23:20:53 -04:00
|
|
|
needs:
|
2019-06-28 12:39:21 -04:00
|
|
|
- clang_tidy_check
|
|
|
|
- clang_tidy_check_all
|
|
|
|
variables:
|
|
|
|
BOT_NEEDS_TRIGGER_BY_NAME: 1
|
|
|
|
|
|
|
|
clang_tidy_deploy_regular:
|
2020-09-26 23:20:53 -04:00
|
|
|
extends:
|
|
|
|
- .clang_tidy_deploy_template
|
2020-10-20 03:00:50 -04:00
|
|
|
- .rules:labels:static_analysis-only
|
2020-09-26 23:20:53 -04:00
|
|
|
needs:
|
2019-06-28 12:39:21 -04:00
|
|
|
- clang_tidy_check_regular
|
|
|
|
|
|
|
|
push_to_github:
|
2020-09-26 23:20:53 -04:00
|
|
|
extends:
|
|
|
|
- .deploy_job_template
|
|
|
|
- .before_script_lesser
|
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
|
|
|
|
|
2020-02-17 23:08:22 -05:00
|
|
|
.deploy_docs_template:
|
2020-09-26 23:20:53 -04:00
|
|
|
extends:
|
|
|
|
- .deploy_job_template
|
|
|
|
- .before_script_lesser
|
2020-02-17 23:08:22 -05:00
|
|
|
image: $ESP_IDF_DOC_ENV_IMAGE
|
2019-06-28 12:39:21 -04:00
|
|
|
tags:
|
|
|
|
- deploy
|
2020-01-10 05:36:52 -05:00
|
|
|
- shiny
|
2020-02-17 23:08:22 -05:00
|
|
|
variables:
|
|
|
|
DOCS_BUILD_DIR: "${IDF_PATH}/docs/_build/"
|
|
|
|
PYTHONUNBUFFERED: 1
|
2019-06-28 12:39:21 -04:00
|
|
|
script:
|
2020-09-26 23:20:53 -04:00
|
|
|
- add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
|
2019-06-28 12:39:21 -04:00
|
|
|
- export GIT_VER=$(git describe --always)
|
2020-02-17 23:08:22 -05:00
|
|
|
- ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh -p 3.6.10 ${IDF_PATH}/tools/ci/deploy_docs.py
|
2019-11-22 02:58:32 -05:00
|
|
|
|
2020-02-18 23:24:59 -05:00
|
|
|
# deploys docs to CI_DOCKER_REGISTRY webserver, for internal review
|
|
|
|
deploy_docs_preview:
|
2020-09-26 23:20:53 -04:00
|
|
|
extends:
|
|
|
|
- .deploy_docs_template
|
2020-11-10 21:27:27 -05:00
|
|
|
- .rules:labels:build_docs-preview
|
2020-06-09 23:32:43 -04:00
|
|
|
# Override default stage to happen before the post_check
|
|
|
|
stage: test_deploy
|
2020-10-28 21:45:43 -04:00
|
|
|
needs:
|
|
|
|
- build_docs_html
|
|
|
|
- build_docs_pdf
|
2020-02-18 23:24:59 -05:00
|
|
|
variables:
|
|
|
|
TYPE: "preview"
|
2020-02-17 23:08:22 -05:00
|
|
|
# older branches use DOCS_DEPLOY_KEY, DOCS_SERVER, DOCS_SERVER_USER, DOCS_PATH for preview server so we keep these names for 'preview'
|
|
|
|
DOCS_DEPLOY_PRIVATEKEY: "$DOCS_DEPLOY_KEY"
|
|
|
|
DOCS_DEPLOY_SERVER: "$DOCS_SERVER"
|
|
|
|
DOCS_DEPLOY_SERVER_USER: "$DOCS_SERVER_USER"
|
|
|
|
DOCS_DEPLOY_PATH: "$DOCS_PATH"
|
|
|
|
DOCS_DEPLOY_URL_BASE: "https://$CI_DOCKER_REGISTRY/docs/esp-idf"
|
2020-02-18 23:24:59 -05:00
|
|
|
|
2020-11-02 04:07:27 -05:00
|
|
|
# deploy docs to production webserver
|
|
|
|
deploy_docs_production:
|
|
|
|
# The DOCS_PROD_* variables used by this job are "Protected" so these branches must all be marked "Protected" in Gitlab settings
|
|
|
|
extends:
|
|
|
|
- .deploy_docs_template
|
|
|
|
- .rules:protected-no_label
|
|
|
|
stage: post_deploy
|
|
|
|
needs: # ensure runs after push_to_github succeeded
|
|
|
|
- build_docs_html
|
|
|
|
- build_docs_pdf
|
|
|
|
- push_to_github
|
|
|
|
variables:
|
|
|
|
TYPE: "preview"
|
|
|
|
DOCS_DEPLOY_PRIVATEKEY: "$DOCS_PROD_DEPLOY_KEY"
|
|
|
|
DOCS_DEPLOY_SERVER: "$DOCS_PROD_SERVER"
|
|
|
|
DOCS_DEPLOY_SERVER_USER: "$DOCS_PROD_SERVER_USER"
|
|
|
|
DOCS_DEPLOY_PATH: "$DOCS_PROD_PATH"
|
|
|
|
DOCS_DEPLOY_URL_BASE: "https://docs.espressif.com/projects/esp-idf"
|
2019-06-28 12:39:21 -04:00
|
|
|
|
|
|
|
deploy_test_result:
|
2020-09-26 23:20:53 -04:00
|
|
|
extends:
|
|
|
|
- .deploy_job_template
|
|
|
|
- .before_script_slim
|
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}
|