mirror of
https://github.com/hwanny1128/HGZero.git
synced 2025-12-06 09:06:24 +00:00
Jenkinsfile: SonarQube 관련 코드 모두 제거
- SKIP_SONARQUBE 파라미터 제거 - SONAR_TOKEN credential 제거 - SonarQube Analysis stage 전체 제거 - 빌드 파이프라인 단순화
This commit is contained in:
parent
ec4a23cc33
commit
d7742d60c3
33
Jenkinsfile
vendored
33
Jenkinsfile
vendored
@ -7,11 +7,6 @@ pipeline {
|
|||||||
choices: ['dev', 'staging', 'prod'],
|
choices: ['dev', 'staging', 'prod'],
|
||||||
description: 'Target environment'
|
description: 'Target environment'
|
||||||
)
|
)
|
||||||
choice(
|
|
||||||
name: 'SKIP_SONARQUBE',
|
|
||||||
choices: ['true', 'false'],
|
|
||||||
description: 'Skip SonarQube Analysis'
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
@ -33,7 +28,6 @@ pipeline {
|
|||||||
// Credentials
|
// Credentials
|
||||||
ACR_CREDENTIALS = credentials('acr-credentials')
|
ACR_CREDENTIALS = credentials('acr-credentials')
|
||||||
DOCKERHUB_CREDENTIALS = credentials('dockerhub-credentials')
|
DOCKERHUB_CREDENTIALS = credentials('dockerhub-credentials')
|
||||||
SONAR_TOKEN = credentials('sonar-token')
|
|
||||||
GIT_CREDENTIALS = credentials('git-credentials')
|
GIT_CREDENTIALS = credentials('git-credentials')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,33 +94,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('SonarQube Analysis') {
|
|
||||||
when {
|
|
||||||
expression { params.SKIP_SONARQUBE == 'false' }
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
echo "🔍 Running SonarQube Analysis..."
|
|
||||||
|
|
||||||
withSonarQubeEnv('SonarQube') {
|
|
||||||
env.SERVICES.split().each { service ->
|
|
||||||
echo "Analyzing ${service}..."
|
|
||||||
sh """
|
|
||||||
./gradlew :${service}:test :${service}:jacocoTestReport :${service}:sonar \
|
|
||||||
-Dsonar.projectKey=hgzero-${service}-${params.ENVIRONMENT} \
|
|
||||||
-Dsonar.projectName=hgzero-${service}-${params.ENVIRONMENT} \
|
|
||||||
-Dsonar.host.url=\${SONAR_HOST_URL} \
|
|
||||||
-Dsonar.token=\${SONAR_TOKEN} \
|
|
||||||
-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/**
|
|
||||||
"""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Archive Artifacts') {
|
stage('Archive Artifacts') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user