Skip to content

Windows docker images for SonarScanner MSBuild with aspnet framework for testing.

Notifications You must be signed in to change notification settings

ncareau/SonarScanner-MSBuild-WindowsDocker

Repository files navigation

SonarScanner-MSBuild-WindowsDocker

Docker Pulls

Windows docker images for SonarScanner MSBuild with aspnet framework for testing.

Use SonarScanner.MSBuild.exe or C:\SonarScanner\SonarScanner.MSBuild.exe to run SonarScanner

Tags

Tag Based on Dockerfile
2004, latest 4.8-windowsservercore-2004 Dockerfile
1909, latest 4.8-windowsservercore-1909 Dockerfile
1903, latest 4.8-windowsservercore-1903 Dockerfile
ltsc2016, latest 4.8-windowsservercore-ltsc2016 Dockerfile
ltsc2019, latest 4.8-windowsservercore-ltsc2019 Dockerfile

How to use

An example of script running in a CI :

- nuget restore Project.sln
- SonarScanner.MSBuild.exe begin /k:$SONAR_PROJECT_ID /d:sonar.host.url=$SONAR_HOST_URL /d:sonar.login=$SONAR_TOKEN
- msbuild Project.sln -p:Configuration=Release -p:Platform=x64 -t:Rebuild
- SonarScanner.MSBuild.exe end /d:sonar.login=$SONAR_TOKEN

Use environment variable or replace $SONAR_ with correct values.

How to build

  1. Clone repo

  2. Add jre server from oracle: https://www.oracle.com/java/technologies/javase-server-jre8-downloads.html

    • Modify Dockerfile with newer java version if needed.
  3. Run docker build

     docker build -f Dockerfile -t sonarscanner-msbuild .
    

Note

This project is beeing built on self-hosted gitlab using a windows server on latest version 2004. All steps are in the .gitlab-ci.yml

About

Windows docker images for SonarScanner MSBuild with aspnet framework for testing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published