mirror of
https://github.com/cna-bootcamp/phonebill.git
synced 2025-12-05 23:56:23 +00:00
Jenkinsfile에서 SonarQube Analysis stage 제거
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
81ad3d1624
commit
608d467691
45
deployment/cicd/Jenkinsfile
vendored
45
deployment/cicd/Jenkinsfile
vendored
@ -98,51 +98,6 @@ podTemplate(
|
||||
}
|
||||
}
|
||||
|
||||
stage('SonarQube Analysis & Quality Gate') {
|
||||
if (skipSonarQube == 'true') {
|
||||
echo "⏭️ Skipping SonarQube Analysis (SKIP_SONARQUBE=${skipSonarQube})"
|
||||
} else {
|
||||
container('gradle') {
|
||||
script {
|
||||
try {
|
||||
// 각 서비스별로 개별적으로 SonarQube 분석 및 Quality Gate 확인
|
||||
services.each { service ->
|
||||
withSonarQubeEnv('SonarQube') {
|
||||
echo "🔍 Starting SonarQube analysis for ${service}..."
|
||||
|
||||
// 서비스별 테스트 및 SonarQube 분석
|
||||
sh """
|
||||
./gradlew :${service}:test :${service}:jacocoTestReport :${service}:sonar \
|
||||
-Dsonar.projectKey=phonebill-${service}-${environment} \
|
||||
-Dsonar.projectName=phonebill-${service}-${environment} \
|
||||
-Dsonar.java.binaries=build/classes/java/main \
|
||||
-Dsonar.coverage.jacoco.xmlReportPaths=build/reports/jacoco/test/jacocoTestReport.xml \
|
||||
-Dsonar.exclusions=**/config/**,**/entity/**,**/dto/**,**/*Application.class,**/exception/**
|
||||
"""
|
||||
|
||||
echo "✅ SonarQube analysis completed for ${service}"
|
||||
}
|
||||
|
||||
// 각 서비스별 Quality Gate 확인
|
||||
timeout(time: 5, unit: 'MINUTES') {
|
||||
echo "⏳ Waiting for Quality Gate result for ${service}..."
|
||||
def qg = waitForQualityGate()
|
||||
if (qg.status != 'OK') {
|
||||
echo "⚠️ Quality Gate failed for ${service}: ${qg.status}, but continuing pipeline..."
|
||||
} else {
|
||||
echo "✅ Quality Gate passed for ${service}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo "🎉 All services passed SonarQube Quality Gates!"
|
||||
} catch (Exception e) {
|
||||
echo "⚠️ SonarQube analysis failed: ${e.getMessage()}, but continuing pipeline..."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build & Push Images') {
|
||||
timeout(time: 30, unit: 'MINUTES') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user