mirror of
https://github.com/cna-bootcamp/phonebill.git
synced 2026-06-13 03:59:10 +00:00
Jenkins CI/CD 파이프라인 구축 완료
- Kustomize 기반 환경별 매니페스트 구성 (dev/staging/prod) - Base 및 Overlay 구조로 환경별 설정 분리 - 각 환경별 Deployment, Service, ConfigMap, Secret 패치 적용 - Jenkinsfile 작성 (Gradle JDK21, SonarQube, Quality Gate 포함) - 환경별 설정 파일 및 수동 배포 스크립트 생성 - Jenkins CI/CD 가이드 문서 및 검증 스크립트 작성 - DEV 환경 Ingress Host를 base와 동일하게 수정 (체크리스트 준수) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Vendored
+13
-16
@@ -12,8 +12,7 @@ podTemplate(
|
||||
slaveConnectTimeout: 300,
|
||||
idleMinutes: 30,
|
||||
activeDeadlineSeconds: 3600,
|
||||
podRetention: never(), // 파드 자동 정리 옵션: never(), onFailure(), always(), default()
|
||||
showRawYaml: false, // 디버깅용 YAML 출력 비활성화
|
||||
podRetention: never(),
|
||||
yaml: '''
|
||||
spec:
|
||||
tolerations:
|
||||
@@ -21,8 +20,6 @@ podTemplate(
|
||||
key: dedicated
|
||||
operator: Equal
|
||||
value: cicd
|
||||
activeDeadlineSeconds: 3600
|
||||
restartPolicy: Never
|
||||
''',
|
||||
containers: [
|
||||
containerTemplate(
|
||||
@@ -118,7 +115,7 @@ podTemplate(
|
||||
timeout(time: 10, unit: 'MINUTES') {
|
||||
def qg = waitForQualityGate()
|
||||
if (qg.status != 'OK') {
|
||||
error "Pipeline aborted due to quality gate failure: \${qg.status}"
|
||||
error "Pipeline aborted due to quality gate failure: ${qg.status}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -162,22 +159,22 @@ podTemplate(
|
||||
cd deployment/cicd/kustomize/overlays/${environment}
|
||||
|
||||
# 이미지 태그 업데이트
|
||||
kustomize edit set image acrdigitalgarage01.azurecr.io/phonebill/api-gateway:${environment}-${imageTag}
|
||||
kustomize edit set image acrdigitalgarage01.azurecr.io/phonebill/user-service:${environment}-${imageTag}
|
||||
kustomize edit set image acrdigitalgarage01.azurecr.io/phonebill/bill-service:${environment}-${imageTag}
|
||||
kustomize edit set image acrdigitalgarage01.azurecr.io/phonebill/product-service:${environment}-${imageTag}
|
||||
kustomize edit set image acrdigitalgarage01.azurecr.io/phonebill/kos-mock:${environment}-${imageTag}
|
||||
|
||||
"""
|
||||
|
||||
services.each { service ->
|
||||
sh "kustomize edit set image acrdigitalgarage01.azurecr.io/phonebill/${service}:${environment}-${imageTag}"
|
||||
}
|
||||
|
||||
sh """
|
||||
# 매니페스트 적용
|
||||
kubectl apply -k .
|
||||
|
||||
echo "Waiting for deployments to be ready..."
|
||||
kubectl -n phonebill-${environment} wait --for=condition=available deployment/${environment}-api-gateway --timeout=300s
|
||||
kubectl -n phonebill-${environment} wait --for=condition=available deployment/${environment}-user-service --timeout=300s
|
||||
kubectl -n phonebill-${environment} wait --for=condition=available deployment/${environment}-bill-service --timeout=300s
|
||||
kubectl -n phonebill-${environment} wait --for=condition=available deployment/${environment}-product-service --timeout=300s
|
||||
kubectl -n phonebill-${environment} wait --for=condition=available deployment/${environment}-kos-mock --timeout=300s
|
||||
"""
|
||||
|
||||
services.each { service ->
|
||||
sh "kubectl -n phonebill-${environment} wait --for=condition=available deployment/${service} --timeout=300s"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user