Add changes to reviewfile
pr-validation/core/pipeline/pr-master There was a failure building this commit Details

pull/515/head
prathabanKavin 2 months ago
parent 754bdc2b25
commit fe48e14c46

55
Jenkinsfile vendored

@ -9,7 +9,6 @@ pipeline {
JAVA_HOME = '/usr/lib/jvm/java-11-openjdk'
PATH = "${JAVA_HOME}/bin:${env.PATH}"
}
stages {
stage('Initialize Variables') {
steps {
@ -45,26 +44,26 @@ pipeline {
echo "CHANGE_AUTHOR: ${env.CHANGE_AUTHOR}"
echo "CHANGE_BRANCH: ${env.CHANGE_BRANCH}"
echo "JAVA_HOME: ${JAVA_HOME}"
echo "PATH: ${PATH}"
echo "PATH: ${PATH}"
}
}
}
stage('Check SonarQube Installation') {
steps {
script {
echo "Initial JAVA_HOME: ${env.JAVA_HOME}"
echo "Initial PATH: ${env.PATH}"
stage('Check SonarQube Installation') {
steps {
script {
echo "Initial JAVA_HOME: ${env.JAVA_HOME}"
echo "Initial PATH: ${env.PATH}"
withEnv(["JAVA_HOME=${env.JAVA_HOME}", "PATH=${env.JAVA_HOME}/bin:${env.PATH}"]) {
sh """
java -version
${SCANNER_HOME}/bin/sonar-scanner --version
"""
}
}
withEnv(["JAVA_HOME=${env.JAVA_HOME}", "PATH=${env.JAVA_HOME}/bin:${env.PATH}"]) {
sh """
java -version
${SCANNER_HOME}/bin/sonar-scanner --version
"""
}
}
}
}
stage('Fetch Pending Upstream Dependencies') {
steps {
@ -113,23 +112,23 @@ pipeline {
}
}
stage('Code Quality Check') {
steps {
script {
def projectName = "device-mgt-core-${env.CHANGE_ID}"
def projectKey = "device-mgt-core-${env.CHANGE_ID}"
stage('Code Quality Check') {
steps {
script {
def projectName = "device-mgt-core-${env.CHANGE_ID}"
def projectKey = "device-mgt-core-${env.CHANGE_ID}"
withSonarQubeEnv('sonar') {
sh """
$SCANNER_HOME/bin/sonar-scanner \
-Dsonar.projectName=${projectName} \
-Dsonar.projectKey=${projectKey} \
-Dsonar.java.binaries=target
"""
}
}
withSonarQubeEnv('sonar') {
sh """
$SCANNER_HOME/bin/sonar-scanner \
-Dsonar.projectName=${projectName} \
-Dsonar.projectKey=${projectKey} \
-Dsonar.java.binaries=target
"""
}
}
}
}
stage('Report Job Status') {
steps {

Loading…
Cancel
Save