From 1c5842cde270c29db95c40033a14e98a290ef3e3 Mon Sep 17 00:00:00 2001 From: Andrew Berezovskyi Date: Tue, 15 Feb 2022 01:59:52 +0100 Subject: [PATCH] wrap sonar in a step Signed-off-by: Andrew Berezovskyi --- Jenkinsfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9c41ec230..8f8e04cd7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,11 +14,11 @@ pipeline { } } stage('Sonar') { - withCredentials([string(credentialsId: 'sonarcloud-token', variable: 'SONARCLOUD_TOKEN')]) { - withSonarQubeEnv('SonarCloud.io') { - mvn clean verify -B sonar:sonar - -Dsonar.projectKey=org.eclipse.lyo -Dsonar.organization=eclipse - -Dsonar.host.url=${SONAR_HOST_URL} -Dsonar.login=${SONARCLOUD_TOKEN} + steps{ + withCredentials([string(credentialsId: 'sonarcloud-token', variable: 'SONARCLOUD_TOKEN')]) { + withSonarQubeEnv('SonarCloud.io') { + mvn clean verify -B sonar:sonar -Dsonar.projectKey=org.eclipse.lyo -Dsonar.organization=eclipse -Dsonar.host.url=${SONAR_HOST_URL} -Dsonar.login=${SONARCLOUD_TOKEN} + } } } }