https://github.com/swissgrc/docker-azure-pipelines-sonarscannermsbuild-7
🐳 Docker image for running Sonar Scanner for .NET 7 in an Azure Pipelines container job
https://github.com/swissgrc/docker-azure-pipelines-sonarscannermsbuild-7
azure-devops azure-pipelines docker hacktoberfest sonar-scanner sonar-scanner-dotnet sonarcloud sonarqube
Last synced: about 2 months ago
JSON representation
🐳 Docker image for running Sonar Scanner for .NET 7 in an Azure Pipelines container job
- Host: GitHub
- URL: https://github.com/swissgrc/docker-azure-pipelines-sonarscannermsbuild-7
- Owner: swissgrc
- License: mit
- Archived: true
- Created: 2023-06-06T19:10:17.000Z (about 2 years ago)
- Default Branch: develop
- Last Pushed: 2024-06-03T12:50:34.000Z (about 1 year ago)
- Last Synced: 2025-03-06T12:17:24.911Z (4 months ago)
- Topics: azure-devops, azure-pipelines, docker, hacktoberfest, sonar-scanner, sonar-scanner-dotnet, sonarcloud, sonarqube
- Language: Dockerfile
- Homepage: https://hub.docker.com/repository/docker/swissgrc/azure-pipelines-sonarscannermsbuild
- Size: 44.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Docker image for running Sonar Scanner for .NET 7 in an Azure Pipelines container job
[](https://github.com/swissgrc/docker-azure-pipelines-sonarscannermsbuild-7/blob/main/LICENSE) [](https://github.com/swissgrc/docker-azure-pipelines-sonarscannermsbuild-7/actions/workflows/publish.yml) [](https://sonarcloud.io/summary/new_code?id=swissgrc_docker-azure-pipelines-sonarscannermsbuild-7) [](https://hub.docker.com/r/swissgrc/azure-pipelines-sonarscannermsbuild) [](https://hub.docker.com/r/swissgrc/azure-pipelines-sonarscannermsbuild)
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:
```yaml
- stage: Build
jobs:
- job: Build
steps:
- task: SonarCloudPrepare@1
displayName: 'Prepare analysis configuration'
target: swissgrc/azure-pipelines-sonarscannermsbuild:7-unstable
inputs:
SonarCloud: 'SonarCloud'
organization: 'myOrganization'
scannerMode: 'MSBuild'
projectKey: 'my-project'
projectName: 'MyProject'
- bash: |
dotnet build
displayName: "Build"
target: swissgrc/azure-pipelines-sonarscannermsbuild:7-unstable
- task: SonarCloudAnalyze@1
displayName: 'Run SonarCloud analysis'
target: swissgrc/azure-pipelines-sonarscannermsbuild:7-unstable
```### Tags
| Tag | Description | Base Image | .NET SDK | NodeJS | Git | Git LFS | Size |
|--------------|-------------------------------------------------|--------------------------------------------|----------|---------|------------|---------|------------------------------------------------------------------------------------------------------------------------------------------------|
| 7-unstable | Latest unstable release (from `develop` branch) | swissgrc/azure-pipelines-openjdk:17.0.11.0 | 7.0.409 | 20.14.0 | 2.39.2-1.1 | 3.5.1 |  |### Configuration
These environment variables are supported:
| Environment variable | Default value | Description |
|------------------------|----------------------------|---------------------------------------------|
| DOTNET_VERSION | `7.0.408` | Version of .NET SDK installed in the image. |
| NODE_VERSION | `20.14.0-1nodesource1` | Version of Node.js installed in the image. |
| GIT_VERSION | `2.39.2-1.1` | Version of Git installed in the image. |
| GITLFS_VERSION | `3.5.1` | Version of Git LFS installed in the image. |[Sonar Scanner for .NET]: https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-msbuild/
[Azure Pipelines container jobs]: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/container-phases