Hi I’ve one pom.xml for multiple projects,
For first I’m using this
stage('SonarQube analysis') {
withSonarQubeEnv('Sonarqube') {
sh 'sudo cp -r /data/automation/online/platformreports-qa1.moglilabs.com/config ${WORKSPACE}/reports/src/main/resources/config/'
sh 'cd ${WORKSPACE}/ && mvn clean package sonar:sonar -Dmaven.test.skip=true -Dsonar.projectName=platformreports-qa1.moglilabs.com-pipeline'
} // SonarQube taskId is automatically attached to the pipeline context
}
& for second,
stage('SonarQube analysis') {
withSonarQubeEnv('Sonarqube') {
sh 'sudo cp -r /data/automation/online/platformdata-qa1.moglilabs.com/config ${WORKSPACE}/dataload/src/main/resources/config/'
sh 'cd ${WORKSPACE}/ && mvn clean package sonar:sonar -Dmaven.test.skip=true -Dsonar.projectName=platformdata-qa1.moglilabs.com-pipeline'
} // SonarQube taskId is automatically attached to the pipeline context
}
So the issue is both are working fine but when I’m building one project the current one overwrite previous one.
So can someone help what I’m missing.