From 516ac9a813b3d695a906047c6d207098a6a621f0 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Tue, 16 Feb 2021 22:06:57 +0800 Subject: [PATCH 1/3] ci: allow failure for code quality report --- .gitlab/ci/static-code-analysis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab/ci/static-code-analysis.yml b/.gitlab/ci/static-code-analysis.yml index 5abf19eb8a..2165696015 100644 --- a/.gitlab/ci/static-code-analysis.yml +++ b/.gitlab/ci/static-code-analysis.yml @@ -58,7 +58,8 @@ code_quality_check: extends: - .sonar_scan_template - .rules:patterns:static-code-analysis-preview - allow_failure: true + allow_failure: true # since now it's using exit code to indicate the code analysis result, + # we don't want to block ci when critical issues founded script: - export CI_MERGE_REQUEST_COMMITS=$(python ${CI_PROJECT_DIR}/tools/ci/ci_get_mr_info.py commits ${CI_COMMIT_REF_NAME} | tr '\n' ',') # test if this branch have merge request, if not, exit 0 @@ -88,6 +89,8 @@ code_quality_report: extends: - .sonar_scan_template - .rules:protected + allow_failure: true # since now it's using exit code to indicate the code analysis result, + # we don't want to block ci when critical issues founded script: - sonar-scanner -Dsonar.branch.name=$CI_COMMIT_REF_NAME From bb1be1e07ebb3fbee87c887f288337e1e158b8e7 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Thu, 18 Feb 2021 18:52:39 +0800 Subject: [PATCH 2/3] ci(rules): add missing scripts under tools folder --- .gitlab/ci/rules.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab/ci/rules.yml b/.gitlab/ci/rules.yml index 1af988eef2..aacc79e126 100644 --- a/.gitlab/ci/rules.yml +++ b/.gitlab/ci/rules.yml @@ -13,6 +13,7 @@ .patterns-c-files: &patterns-c-files - ".gitlab/ci/static-code-analysis.yml" + - "tools/ci/static-analysis-rules.yml" - "**/*.{c,C}" - "**/*.{h,H}" - "components/**/Kconfig" @@ -121,6 +122,9 @@ - "tools/kconfig_new/**/*" + - "tools/detect_python.sh" + - "tools/detect_python.fish" + .patterns-windows: &patterns-windows - "tools/windows/**/*" From 0c57d1fef16d2bceb786331a03a308e53b20b808 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Thu, 18 Feb 2021 19:30:43 +0800 Subject: [PATCH 3/3] ci: update codeowner for new ci configs path --- .gitlab/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/CODEOWNERS b/.gitlab/CODEOWNERS index c591cae4cb..061ffe5cb6 100644 --- a/.gitlab/CODEOWNERS +++ b/.gitlab/CODEOWNERS @@ -47,6 +47,7 @@ * @esp-idf-codeowners/other /.* @esp-idf-codeowners/tools +/.gitlab/ci/ @esp-idf-codeowners/ci /.gitlab-ci.yml @esp-idf-codeowners/ci /.pre-commit-config.yaml @esp-idf-codeowners/ci /.readthedocs.yml @esp-idf-codeowners/docs