Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

🐳 Docker image for running Sonar Scanner for .NET in an Azure Pipelines container job

License

Notifications You must be signed in to change notification settings

swissgrc/docker-azure-pipelines-sonarscannermsbuild-6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker image for running Sonar Scanner for .NET 6 in an Azure Pipelines container job

License Build Quality Gate Status Pulls Stars

Docker image to run Sonar Scanner for .NET in Azure Pipelines container jobs.

Usage

This image can be used to run Sonar Scanner CLI in Azure Pipelines container jobs.

Azure Pipelines Container Job

To use the image in an Azure Pipelines Container Job, add one of the following example tasks and use it with the container property.

The following example shows the container used for a deployment step which shows .NET version:

  - stage: Build
    jobs:
    - job: Build
      steps:
      - task: SonarCloudPrepare@1
        displayName: 'Prepare analysis configuration'
        target: swissgrc/azure-pipelines-sonarscannermsbuild:latest
        inputs:
          SonarCloud: 'SonarCloud'
          organization: 'myOrganization'
          scannerMode: 'MSBuild'
          projectKey: 'my-project'
          projectName: 'MyProject'
      - bash: |
          dotnet build
        displayName: "Build"
        target: swissgrc/azure-pipelines-sonarscannermsbuild:latest
      - task: SonarCloudAnalyze@1
        displayName: 'Run SonarCloud analysis'
        target: swissgrc/azure-pipelines-sonarscannermsbuild:latest

Tags

Tag Description Base Image .NET SDK NodeJS Git Git LFS Size
6-unstable Latest unstable release (from develop branch) swissgrc/azure-pipelines-openjdk:17.0.12.0 6.0.428 20.18.0 2.39.5-0+deb12u1 3.5.1 Docker Image Size (tag)

Configuration

These environment variables are supported:

Environment variable Default value Description
DOTNET_VERSION 6.0.424 Version of .NET SDK installed in the image.
NODE_VERSION 20.17.0-1nodesource1 Version of Node.js installed in the image.
GIT_VERSION 2.39.5-0+deb12u1 Version of Git installed in the image.
GITLFS_VERSION 3.5.1 Version of Git LFS installed in the image.