From 6232c3584fcc5018cfe9ef5a79863a0f609e58fa Mon Sep 17 00:00:00 2001 From: soufiane Date: Tue, 25 Nov 2025 14:19:03 +0100 Subject: [PATCH] feat: add SonarQube analysis stage to pipeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- Jenkinsfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 41f2e262..c8e168e3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -81,6 +81,28 @@ pipeline { } } + stage('SonarQube Analysis') { + agent { + docker { + image 'sonarsource/sonar-scanner-cli:latest' + args '-u root' + } + } + steps { + echo "🔍 Analyse SonarQube..." + withSonarQubeEnv('SonarQube') { + sh """ + sonar-scanner \ + -Dsonar.projectKey=the-tip-top-backend \ + -Dsonar.projectName='Thé Tip Top Backend' \ + -Dsonar.sources=. \ + -Dsonar.exclusions=node_modules/**,coverage/**,dist/** \ + -Dsonar.javascript.lcov.reportPaths=coverage/lcov.info + """ + } + } + } + stage('Build Docker image') { steps { echo "🐳 Construction de l’image Docker backend..."