SonarQube 단계 가시성 개선 및 String Parameter 지원

- SonarQube 단계가 항상 파이프라인에 표시되도록 구조 변경
- String Parameter로 SKIP_SONARQUBE 처리하도록 로직 수정
- 파라미터 디버깅 출력 강화로 동작 상태 명확화
- 백엔드 CI/CD 가이드에 모든 변경사항 반영
This commit is contained in:
hiondal 2025-09-13 16:37:42 +09:00
parent 13460fd930
commit 3cbf56066f
2 changed files with 13 additions and 3 deletions

View File

@ -71,7 +71,15 @@ podTemplate(
def props
def imageTag = getImageTag()
def environment = params.ENVIRONMENT ?: 'dev'
def skipSonarQube = params.SKIP_SONARQUBE ?: true
def skipSonarQube = (params.SKIP_SONARQUBE?.toLowerCase() == 'true')
// 파라미터 값 디버깅 출력
echo "=== Parameter Debug Info ==="
echo "params.SKIP_SONARQUBE raw value: [${params.SKIP_SONARQUBE}]"
echo "params.SKIP_SONARQUBE type: ${params.SKIP_SONARQUBE?.getClass()}"
echo "skipSonarQube final boolean value: ${skipSonarQube}"
echo "Will skip SonarQube: ${skipSonarQube ? 'YES' : 'NO'}"
echo "=========================="
def services = ['api-gateway', 'user-service', 'bill-service', 'product-service', 'kos-mock']
try {
@ -101,8 +109,10 @@ podTemplate(
}
}
if (!skipSonarQube) {
stage('SonarQube Analysis & Quality Gate') {
if (skipSonarQube) {
echo "⏭️ Skipping SonarQube Analysis (SKIP_SONARQUBE=${params.SKIP_SONARQUBE})"
} else {
container('gradle') {
withSonarQubeEnv('SonarQube') {
// 각 서비스별 테스트 및 SonarQube 분석

Binary file not shown.