【发布时间】:2018-12-04 20:54:32
【问题描述】:
我想在 Linux 容器中使用 their new support 为 dotnet 全局工具运行 SonarQube 分析。我想知道在这种情况下配置(服务器 URL、用户凭据)在哪里?
【问题讨论】:
标签: docker .net-core sonarqube
我想在 Linux 容器中使用 their new support 为 dotnet 全局工具运行 SonarQube 分析。我想知道在这种情况下配置(服务器 URL、用户凭据)在哪里?
【问题讨论】:
标签: docker .net-core sonarqube
这很适合我:
FROM microsoft/dotnet:2.1.300-sdk
RUN apt-get update && apt-get install -y openjdk-8-jre
RUN dotnet tool install --global dotnet-sonarscanner --version 4.3.1
COPY SonarQube.Analysis.xml /root/.dotnet/tools/.store/dotnet-sonarscanner/4.3.1/dotnet-sonarscanner/4.3.1/tools/netcoreapp2.1/any/SonarQube.Analysis.xml
ENV PATH="/root/.dotnet/tools:${PATH}"
RUN dotnet sonarscanner begin /k:project-key
RUN dotnet build
RUN dotnet sonarscanner end
显然,它需要在存在SonarQube.Analysis.xml 文件的上下文中构建。
【讨论】: