Jenkins 쉘 호환성 문제 해결 - 최종 완성

- Bash 배열 문법을 POSIX 호환 공백 구분 문자열로 변경
- 모든 쉘 환경(/bin/sh, /bin/bash, /bin/dash)에서 안정적 동작 보장
- 'syntax error: unexpected ((' 에러 완전 해결
- 가이드에 쉘 호환성 문제와 해결책 상세 설명 추가
- Jenkins 컨테이너 환경에 무관하게 범용 적용 가능한 안정적 파이프라인 완성

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
hiondal 2025-09-12 21:26:59 +09:00
parent 85ef46a3d1
commit 50667687f5

View File

@ -169,11 +169,11 @@ podTemplate(
# 환경별 디렉토리로 이동
cd deployment/cicd/kustomize/overlays/${environment}
# 서비스 배열 정의 (Bash 배열)
svc_list=(api-gateway user-service bill-service product-service kos-mock)
# 서비스 목록 (공백으로 구분)
services="api-gateway user-service bill-service product-service kos-mock"
# 이미지 태그 업데이트
for service in "\${svc_list[@]}"; do
for service in \$services; do
\$HOME/bin/kustomize edit set image acrdigitalgarage01.azurecr.io/phonebill/\$service:${environment}-${imageTag}
done
@ -182,7 +182,7 @@ podTemplate(
# 배포 상태 확인
echo "Waiting for deployments to be ready..."
for service in "\${svc_list[@]}"; do
for service in \$services; do
kubectl -n phonebill-${environment} wait --for=condition=available deployment/\$service --timeout=300s
done
"""