From 5ceb748c299bc5dae6dbca10af342ac94f7afd7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=A0=E9=AB=98=E5=8D=8E?= <13051578712@163.com> Date: Mon, 22 Jul 2024 11:52:33 +0800 Subject: [PATCH] =?UTF-8?q?sonarqube-check=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..eefe2da63 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,16 @@ +sonarqube-check: + image: + name: sonarsource/sonar-scanner-cli:latest + entrypoint: [""] + variables: + SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache + GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task + cache: + key: "${CI_JOB_NAME}" + paths: + - .sonar/cache + script: + - sonar-scanner + allow_failure: true + only: + - master # or the name of your main branch