赞
踩
- analysis_Win:
- stage: analysis
- before_script:
- - git config --system core.longpaths true
- #用于启用 Git 仓库中文件路径长度大于 260 字符的支持。
- script:
- - SonarScanner.MSBuild.exe begin
- /k:"$SONAR_PROJECT_KEYS"
- /d:sonar.host.url="$SONAR_HOST_URL"
- /d:sonar.branch.name="$CI_COMMIT_REF_NAME -Win"
- /d:sonar.login="$SONAR_TOKEN"
- /v:"$CI_COMMIT_TAG"
- /d:sonar.exclusions=Assets/**/Plugins/**/*
- - MSBuild.exe WinDEMOPATHs_$CI_PIPELINE_IID.sln /t:Rebuild /m
- - SonarScanner.MSBuild.exe end /d:sonar.login="$SONAR_TOKEN"
- analysis_win:
- stage: analysis
- before_script:
- - git config --system core.longpaths true
- script:
- - SonarScanner.MSBuild.exe begin
- -k:"$SONAR_PROJECT_KEYS"
- -d:sonar.host.url="$SONAR_HOST_URL"
- -d:sonar.login="$SONAR_TOKEN"
- -v:"$CI_COMMIT_TAG"
- -d:sonar.exclusions=Assets/**/Plugins/**/*
- -d:sonar.pullrequest.key=$CI_MERGE_REQUEST_IID
- -d:sonar.pullrequest.branch=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
- -d:sonar.pullrequest.base=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
- -d:sonar.qualitygate.wait=true
- - MSBuild.exe AndroidDEMOPATHs_$CI_PIPELINE_IID.sln /t:Rebuild /m
- - SonarScanner.MSBuild.exe end /d:sonar.login="$SONAR_TOKEN"
- 添加三个参数:Pull Request analysis
- 参数 "/d:sonar.branch.name" 与 pull request的三个参数冲突,不能一起使用。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。