Browse Source

ajout du stage sonarqube

DESKTOP-SMCIPAV\falko 5 months ago
parent
commit
0b0eb3a4f4
1 changed files with 16 additions and 16 deletions
  1. 16 16
      Jenkinsfile

+ 16 - 16
Jenkinsfile

@@ -112,22 +112,22 @@ pipeline {
 //             }
 //             }
 //         }
 //         }
 
 
-//         // stage('SonarQube Analysis') {
-//         //     steps {
-//         //         script {
-//         //             def scannerHome = tool name: 'SonarQube Scanner', type: 'hudson.plugins.sonar.SonarRunnerInstallation';
-//         //             withSonarQubeEnv('SonarQube') { // Nom du serveur SonarQube configuré dans Jenkins
-//         //                 sh """
-//         //                 ${scannerHome}/bin/sonar-scanner \
-//         //                 -Dsonar.projectKey=FatboarProject-${env.BRANCH_NAME} \
-//         //                 -Dsonar.sources=. \
-//         //                 -Dsonar.host.url=https://sonarqube.foodgame.fr \
-//         //                 -Dsonar.login=sqa_d81445ef2d3961cddf7e29e31c1aeb2505aacdbd
-//         //                 """
-//         //             }
-//         //         }
-//         //     }
-//         // }
+        stage('SonarQube Analysis') {
+            steps {
+                script {
+                    def scannerHome = tool name: 'SonarQube Scanner', type: 'hudson.plugins.sonar.SonarRunnerInstallation';
+                    withSonarQubeEnv('SonarQube') { // Nom du serveur SonarQube configuré dans Jenkins
+                        sh """
+                        ${scannerHome}/bin/sonar-scanner \
+                        -Dsonar.projectKey=FatboarProject-${env.BRANCH_NAME} \
+                        -Dsonar.sources=. \
+                        -Dsonar.host.url=https://sonarqube.foodgame.fr \
+                        -Dsonar.login=sqa_9ec3588a80a0b8458d9273dbb6eb7f6ae91b446a
+                        """
+                    }
+                }
+            }
+        }
 
 
 //         stage('Stop Containers') {
 //         stage('Stop Containers') {
 //             steps {
 //             steps {