Shallow clone detected, no blame information will be provided. You can convert to non
[WARNING] Shallow clone detected, no blame information will be provided. You can convert to non-shallow with 'git fetch --unshallow'.
sonarqube执行扫描代码时,报错上所示。导致不能将bug自动关联到责任人信息(责任人信息与sonarqube用户的SCM账号也有关系)。是因为git浅克隆的原因。需要在gitlab runner执行时,配置git fetch --unshallow || true。具体配置如下:
sonarqube-check:stage: .pretags:- sharedrunnerimage: maven:3.6.3-jdk-11variables:SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cacheGIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis taskcache:key: "${CI_JOB_NAME}"paths:- .sonar/cachebefore_script:- git fetch --unshallow || truescript: - mvn verify sonar:sonar -Dsonar.projectKey=rmis_rmis-backend_AYmRKhJ4OvT7Wd1RdzKiallow_failure: trueonly:- master
Shallow clone detected, no blame information will be provided. You can convert to non
[WARNING] Shallow clone detected, no blame information will be provided. You can convert to non-shallow with 'git fetch --unshallow'.
sonarqube执行扫描代码时,报错上所示。导致不能将bug自动关联到责任人信息(责任人信息与sonarqube用户的SCM账号也有关系)。是因为git浅克隆的原因。需要在gitlab runner执行时,配置git fetch --unshallow || true。具体配置如下:
sonarqube-check:stage: .pretags:- sharedrunnerimage: maven:3.6.3-jdk-11variables:SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cacheGIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis taskcache:key: "${CI_JOB_NAME}"paths:- .sonar/cachebefore_script:- git fetch --unshallow || truescript: - mvn verify sonar:sonar -Dsonar.projectKey=rmis_rmis-backend_AYmRKhJ4OvT7Wd1RdzKiallow_failure: trueonly:- master
发布评论