mirror of
https://github.com/cna-bootcamp/phonebill.git
synced 2025-12-06 16:16:23 +00:00
Jenkins Bash 배열 변수 충돌 해결
- Groovy 'services' 변수와 Bash 'services' 배열 이름 충돌 방지 - Bash 배열명을 'svc_list'로 변경하여 syntax error 해결 - 가이드에 변수 충돌 방지 방법과 문제해결 섹션 추가 - Jenkins 파이프라인 안정성 향상 및 범용 적용 가능 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
125de3b6e2
commit
85ef46a3d1
8
deployment/cicd/Jenkinsfile
vendored
8
deployment/cicd/Jenkinsfile
vendored
@ -169,11 +169,11 @@ podTemplate(
|
|||||||
# 환경별 디렉토리로 이동
|
# 환경별 디렉토리로 이동
|
||||||
cd deployment/cicd/kustomize/overlays/${environment}
|
cd deployment/cicd/kustomize/overlays/${environment}
|
||||||
|
|
||||||
# 서비스 배열 정의
|
# 서비스 배열 정의 (Bash 배열)
|
||||||
services=(api-gateway user-service bill-service product-service kos-mock)
|
svc_list=(api-gateway user-service bill-service product-service kos-mock)
|
||||||
|
|
||||||
# 이미지 태그 업데이트
|
# 이미지 태그 업데이트
|
||||||
for service in "\${services[@]}"; do
|
for service in "\${svc_list[@]}"; do
|
||||||
\$HOME/bin/kustomize edit set image acrdigitalgarage01.azurecr.io/phonebill/\$service:${environment}-${imageTag}
|
\$HOME/bin/kustomize edit set image acrdigitalgarage01.azurecr.io/phonebill/\$service:${environment}-${imageTag}
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ podTemplate(
|
|||||||
|
|
||||||
# 배포 상태 확인
|
# 배포 상태 확인
|
||||||
echo "Waiting for deployments to be ready..."
|
echo "Waiting for deployments to be ready..."
|
||||||
for service in "\${services[@]}"; do
|
for service in "\${svc_list[@]}"; do
|
||||||
kubectl -n phonebill-${environment} wait --for=condition=available deployment/\$service --timeout=300s
|
kubectl -n phonebill-${environment} wait --for=condition=available deployment/\$service --timeout=300s
|
||||||
done
|
done
|
||||||
"""
|
"""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user