feat: add SonarQube analysis stage to pipeline
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
5c8d6b9262
commit
6232c3584f
22
Jenkinsfile
vendored
22
Jenkinsfile
vendored
|
|
@ -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') {
|
stage('Build Docker image') {
|
||||||
steps {
|
steps {
|
||||||
echo "🐳 Construction de l’image Docker backend..."
|
echo "🐳 Construction de l’image Docker backend..."
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user