mirror of
https://github.com/cna-bootcamp/phonebill.git
synced 2025-12-06 16:16:23 +00:00
Kustomize 작업 디렉토리 문제 해결
- 모든 명령을 단일 sh 블록에서 실행하여 작업 디렉토리 유지 - Bash 배열과 for 루프로 서비스 처리 방식 변경 - Jenkins 쉘 세션 분리로 인한 kustomization.yaml 인식 오류 해결 - PATH 환경변수와 cd 명령 효과가 모든 후속 명령에 지속 적용 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
97117b6ec4
commit
125de3b6e2
20
deployment/cicd/Jenkinsfile
vendored
20
deployment/cicd/Jenkinsfile
vendored
@ -168,24 +168,24 @@ podTemplate(
|
|||||||
|
|
||||||
# 환경별 디렉토리로 이동
|
# 환경별 디렉토리로 이동
|
||||||
cd deployment/cicd/kustomize/overlays/${environment}
|
cd deployment/cicd/kustomize/overlays/${environment}
|
||||||
"""
|
|
||||||
|
|
||||||
// 이미지 태그 업데이트
|
# 서비스 배열 정의
|
||||||
services.each { service ->
|
services=(api-gateway user-service bill-service product-service kos-mock)
|
||||||
sh "\$HOME/bin/kustomize edit set image acrdigitalgarage01.azurecr.io/phonebill/${service}:${environment}-${imageTag}"
|
|
||||||
}
|
# 이미지 태그 업데이트
|
||||||
|
for service in "\${services[@]}"; do
|
||||||
|
\$HOME/bin/kustomize edit set image acrdigitalgarage01.azurecr.io/phonebill/\$service:${environment}-${imageTag}
|
||||||
|
done
|
||||||
|
|
||||||
sh """
|
|
||||||
# 매니페스트 적용
|
# 매니페스트 적용
|
||||||
kubectl apply -k .
|
kubectl apply -k .
|
||||||
|
|
||||||
# 배포 상태 확인
|
# 배포 상태 확인
|
||||||
echo "Waiting for deployments to be ready..."
|
echo "Waiting for deployments to be ready..."
|
||||||
|
for service in "\${services[@]}"; do
|
||||||
|
kubectl -n phonebill-${environment} wait --for=condition=available deployment/\$service --timeout=300s
|
||||||
|
done
|
||||||
"""
|
"""
|
||||||
|
|
||||||
services.each { service ->
|
|
||||||
sh "kubectl -n phonebill-${environment} wait --for=condition=available deployment/${service} --timeout=300s"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user