The sonar.login property is deprecated and will be removed in future
versions of SonarQube. Replace it with sonar.token as recommended
by SonarCloud.
Fixes warnings reported in job logs and SonarCloud analysis status.
Change-Id: I1cee4720c8e22ae263292c20f7cafa0aa1f3d0f6
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
--- /dev/null
+---
+fixes:
+ - |
+ Replace deprecated ``sonar.login`` property with ``sonar.token`` in
+ SonarCloud integration scripts. The ``sonar.login`` property has been
+ deprecated by SonarCloud and will be removed in future versions.
+
+ This change eliminates the following warning that appeared in job logs
+ and SonarCloud analysis status pages:
+
+ "The property 'sonar.login' is deprecated and will be removed in the
+ future. Please use the 'sonar.token' property instead when passing a
+ token."
+
+ Affected scripts:
+
+ * ``shell/maven-sonar.sh`` - Maven-based SonarCloud jobs
+ * ``shell/cmake-sonar.sh`` - CMake-based SonarCloud jobs
-Dsonar.sources=. \
-Dsonar.cfamily.build-wrapper-output="$WORKSPACE/bw-output" \
-Dsonar.host.url="${SONAR_HOST_URL}" \
- -Dsonar.login="${API_TOKEN}"
+ -Dsonar.token="${API_TOKEN}"
if [ "$SONAR_HOST_URL" = "https://sonarcloud.io" ]; then
params+=("-Dsonar.projectKey=$PROJECT_KEY")
params+=("-Dsonar.organization=$PROJECT_ORGANIZATION")
- params+=("-Dsonar.login=$API_TOKEN")
+ params+=("-Dsonar.token=$API_TOKEN")
if [ "$SCAN_DEV_BRANCH" = "True" ]; then
echo "Will scan short lived branch ..."
# shellcheck disable=SC2236