From 08e9d3db3c186cc047b6c7ef9545ee596b597f63 Mon Sep 17 00:00:00 2001 From: subodh Date: Thu, 12 Mar 2026 04:35:35 +0000 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0df328b..bf4b140 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,6 @@ pipeline { environment { HARBOR = 'harbor.myriadcara.com' IMAGE = 'harbor.myriadcara.com/vaishnavi-ecommerce/backend' - SONAR_HOST = 'https://sonarqube.myriadcara.com' SONAR_PROJECT = 'ecommerce' VERSION_FILE = '/var/jenkins_home/vaishnavi-backend-version.txt' } @@ -20,15 +19,12 @@ pipeline { } else { version = '1.0.0' } - def parts = version.tokenize('.') def major = parts[0].toInteger() def minor = parts[1].toInteger() def patch = parts[2].toInteger() + 1 - def newVersion = "${major}.${minor}.${patch}" writeFile file: VERSION_FILE, text: newVersion - env.TAG = newVersion echo "🏷️ New image tag: v${env.TAG}" } @@ -37,7 +33,7 @@ pipeline { stage('SonarQube Scan') { steps { - withSonarQubeEnv('SonarQube') { + withSonarQubeEnv('SonarQube') { // 'SonarQube' must match Jenkins config name withCredentials([string( credentialsId: 'sonarqube-token', variable: 'SONAR_TOKEN' @@ -47,7 +43,7 @@ pipeline { -Dsonar.projectKey=${SONAR_PROJECT} \ -Dsonar.projectName=${SONAR_PROJECT} \ -Dsonar.sources=. \ - -Dsonar.login=\$SONAR_TOKEN \ + -Dsonar.token=\$SONAR_TOKEN \ -Dsonar.projectVersion=${env.TAG} """ }