Jenkins 문법 오류 수정

- sh 블록과 Groovy 코드 분리하여 파싱 에러 방지
- kustomize 설치/이미지 업데이트/배포 확인을 명확한 단계로 구분
- 각 sh 블록이 독립적으로 실행되도록 구조화
- Jenkins DSL 문법 준수로 안정적인 파이프라인 보장

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
hiondal 2025-09-12 20:51:51 +09:00
parent 2eea6c17b5
commit 97117b6ec4

View File

@ -168,23 +168,24 @@ podTemplate(
# 환경별 디렉토리로 이동 # 환경별 디렉토리로 이동
cd deployment/cicd/kustomize/overlays/${environment} cd deployment/cicd/kustomize/overlays/${environment}
# 이미지 태그 업데이트
""" """
// 이미지 태그 업데이트
services.each { service -> services.each { service ->
sh "\$HOME/bin/kustomize edit set image acrdigitalgarage01.azurecr.io/phonebill/${service}:${environment}-${imageTag}" sh "\$HOME/bin/kustomize edit set image acrdigitalgarage01.azurecr.io/phonebill/${service}:${environment}-${imageTag}"
} }
sh """
# 매니페스트 적용 # 매니페스트 적용
kubectl apply -k . kubectl apply -k .
# 배포 상태 확인 # 배포 상태 확인
echo "Waiting for deployments to be ready..." echo "Waiting for deployments to be ready..."
""" """
services.each { service -> services.each { service ->
sh "kubectl -n phonebill-${environment} wait --for=condition=available deployment/${service} --timeout=300s" sh "kubectl -n phonebill-${environment} wait --for=condition=available deployment/${service} --timeout=300s"
} }
"""
} }
} }