本文主要是介绍Shallow clone detected, no blame information will be provided. You can convert to non-shallow,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
[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-shallow的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!