From 5c75d795d157b04ee5e8abdf91b182481582619d Mon Sep 17 00:00:00 2001 From: Bharatkumar5690 Date: Wed, 8 Mar 2023 12:41:49 +0530 Subject: [PATCH] added artifacts and test reports --- Jenkinsfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9cfae8aff..adbc168cc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,7 +12,13 @@ pipeline { sh 'mvn package' } } - stage('test code by using sonarqube') { + stage('Test the code by using sonarqube') { + steps { + withSonarQubeEnv('SONAR_CLOUD') { + sh 'mvn clean package sonar:sonar' + } + } + stage('Gathering the artifacts & test results') { steps { archiveArtifacts artifacts: '**/target/*.jar', onlyIfSuccessful: true,