Newer
Older
---
image:
name: sonarsource/sonar-scanner-cli:${SONAR_SCANNER_CLI_VERSION}
stages:
- sonarqube
test:
stage: sonarqube
variables:
SONAR_PROJECT_BASE_DIR: "$CI_PROJECT_DIR"
script:
- /usr/bin/entrypoint.sh sonar-scanner -Dsonar.projectKey="$CI_PROJECT_NAME" # sonar.projectKey defines the name of the project in SonarQube. In this example it uses the same name of the project in Gitlab.
tags: # NOT to be confused with git tags. This is GitLab tag
- sonarqube