From b3ad8283c0b9891159dca35102f28bd594c125d3 Mon Sep 17 00:00:00 2001 From: SniAssia Date: Mon, 17 Nov 2025 20:00:10 +0000 Subject: [PATCH] c bon --- JenkinsFile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/JenkinsFile b/JenkinsFile index aa27652de..a2b675868 100644 --- a/JenkinsFile +++ b/JenkinsFile @@ -48,13 +48,14 @@ pipeline { stage('SonarQube Analysis') { steps { dir('.') { // <-- use root directory - sh """ - ./mvnw sonar:sonar \ - -Dsonar.projectKey=RhitaKhadijaAssia_spring-petclinic \ - -Dsonar.organization=rhitakhadijaassia \ - -Dsonar.host.url=${SONAR_HOST} \ - -Dsonar.login=${SONAR_TOKEN} - """ + withCredentials([string(credentialsId: '01', variable: 'SONAR_TOKEN')]) { + sh """./mvnw sonar:sonar \ + -Dsonar.projectKey=RhitaKhadijaAssia_spring-petclinic \ + -Dsonar.organization=rhitakhadijaassia \ + -Dsonar.host.url=${SONAR_HOST} \ + -Dsonar.login=${SONAR_TOKEN}""" + } + } } }