mirror of
https://github.com/cna-bootcamp/phonebill.git
synced 2025-12-06 08:06:24 +00:00
Jenkinsfile props.namespace 변수 참조 개선
- Setup Kubernetes 스테이지 제거 (사용자 수정 반영) - Update Kustomize & Deploy 스테이지에서 namespace 변수 로컬 정의 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
3d8ee6802c
commit
250f5943ea
13
deployment/cicd/Jenkinsfile
vendored
13
deployment/cicd/Jenkinsfile
vendored
@ -76,16 +76,6 @@ podTemplate(
|
||||
props = readProperties file: "deployment/cicd/config/deploy_env_vars_${environment}"
|
||||
}
|
||||
|
||||
stage("Setup Kubernetes") {
|
||||
container('kubectl') {
|
||||
echo "🔧 Setting up Kubernetes namespace: ${props.namespace}"
|
||||
sh """
|
||||
kubectl create namespace ${props.namespace} --dry-run=client -o yaml | kubectl apply -f -
|
||||
"""
|
||||
echo "✅ Kubernetes namespace setup completed"
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
container('gradle') {
|
||||
sh """
|
||||
@ -174,6 +164,7 @@ podTemplate(
|
||||
|
||||
stage('Update Kustomize & Deploy') {
|
||||
container('kubectl') {
|
||||
def namespace = props.namespace
|
||||
sh """
|
||||
# Kustomize 설치 (sudo 없이 사용자 디렉토리에 설치)
|
||||
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
|
||||
@ -198,7 +189,7 @@ podTemplate(
|
||||
# 배포 상태 확인
|
||||
echo "Waiting for deployments to be ready..."
|
||||
for service in \$services; do
|
||||
kubectl -n ${props.namespace} wait --for=condition=available deployment/\$service --timeout=300s
|
||||
kubectl -n ${namespace} wait --for=condition=available deployment/\$service --timeout=300s
|
||||
done
|
||||
"""
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user