Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
dev:git:sonar:addproject [2022/05/03 13:44] – created jsdev:git:sonar:addproject [2022/05/04 07:47] (current) js
Line 35: Line 35:
         - Value: https://sq.schnuerle.com:9999         - Value: https://sq.schnuerle.com:9999
         - Uncheck both: Protect Variable / Mask Variable \\ \\          - Uncheck both: Protect Variable / Mask Variable \\ \\ 
 +  - enable shared runners in Settings -> CI/CD {{ :dev:git:sonar:enable-shared-runners.png?direct |}}
   - add .sonar-wrapper script to project in root dir \\ We use the .sonar-wrapper script in the project main branch to configure files without extensions \\ \\    - add .sonar-wrapper script to project in root dir \\ We use the .sonar-wrapper script in the project main branch to configure files without extensions \\ \\ 
   - add sonarqube job in .gitlab-ci.yml<code>stages:   - add sonarqube job in .gitlab-ci.yml<code>stages:
  - sonarqube  - sonarqube
-  +   
-  +include
-sonarqube_check_job+  - remote'https://gitsrv.schnuerle.com:8443/sonar/sonar-wrapper/-/raw/main/sonar-gitlab-ci.yml' 
-  only: + 
-    refs: +  
-      tags +
-    variables: +
-      - $CI_COMMIT_TAG =~ /^[Cc]heck_source-.*$/                                                         # commit tag starts job +
-  image:  +
-    namesonarsource/sonar-scanner-cli:latest +
-    entrypoint: [""+
-  tags: +
-    - sonarqube-runner +
-  stage: sonarqube +
-  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:  +
-      # we use a wrapper script to detect files without extension - all parameters after the sonar-wrapper are used for the sonar-scanner call +
-      # additional we configure sonar-scanner to use config file ".sonar-project.properties" (dot) +
-      # -X is used for sonar-scanner and sonar-wrapper for trace output +
-      - chmod 0777 .sonar-wrapper +
-      - ./.sonar-wrapper -X  allow_failure: true+
   </code>   </code>