https://github.com/swissgrc/docker-azure-pipelines-sonarscannercli
🐳 Docker image for running Sonar Scanner CLI in an Azure Pipelines container job
https://github.com/swissgrc/docker-azure-pipelines-sonarscannercli
azure-devops azure-pipelines hacktoberfest sonar-scanner sonar-scanner-cli sonarcloud sonarqube
Last synced: 4 months ago
JSON representation
🐳 Docker image for running Sonar Scanner CLI in an Azure Pipelines container job
- Host: GitHub
- URL: https://github.com/swissgrc/docker-azure-pipelines-sonarscannercli
- Owner: swissgrc
- License: mit
- Created: 2022-08-11T12:49:41.000Z (almost 3 years ago)
- Default Branch: develop
- Last Pushed: 2025-01-21T19:13:05.000Z (6 months ago)
- Last Synced: 2025-01-21T20:23:06.514Z (6 months ago)
- Topics: azure-devops, azure-pipelines, hacktoberfest, sonar-scanner, sonar-scanner-cli, sonarcloud, sonarqube
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/swissgrc/azure-pipelines-sonarscannercli
- Size: 109 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Docker image for running Sonar Scanner CLI in an Azure Pipelines container job
[](https://github.com/swissgrc/docker-azure-pipelines-sonarscannercli/blob/main/LICENSE) [](https://github.com/swissgrc/docker-azure-pipelines-sonarscannercli/actions/workflows/publish.yml) [](https://sonarcloud.io/summary/new_code?id=swissgrc_docker-azure-pipelines-sonarscannercli) [](https://hub.docker.com/r/swissgrc/azure-pipelines-sonarscannercli) [](https://hub.docker.com/r/swissgrc/azure-pipelines-sonarscannercli)
Docker image to run [Sonar Scanner CLI] 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-sonarscannercli:latest
inputs:
SonarCloud: 'SonarCloud'
organization: 'myOrganization'
scannerMode: 'CLI'
configMode: 'manual'
cliProjectKey: 'my-project'
cliProjectName: 'MyProject'
cliSources: '.'
```### Tags
| Tag | Description | Base Image | Node.js | Size |
|------------|-------------------------------------------------|--------------------------------------------|-----------|------------------------------------------------------------------------------------------------------------------------------------------|
| unstable | Latest unstable release (from `develop` branch) | swissgrc/azure-pipelines-openjdk:17.0.13.0 | `22.13.1` |  |[Sonar Scanner CLI]: https://docs.sonarqube.org/latest/analysis/scan/sonarscanner/
[Azure Pipelines container jobs]: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/container-phases