mirror of
https://github.com/hwanny1128/HGZero.git
synced 2025-12-06 10:16:24 +00:00
Jenkinsfile: Update manifest repo to modify overlays/dev/kustomization.yaml
- Change target from base/deployment.yaml to overlays/dev/kustomization.yaml - Update images section's newTag for 4 services (user, meeting, stt, notification) - Keep other services (ai, ai-python, rag) unchanged
This commit is contained in:
parent
52b32cf978
commit
784b48548b
16
Jenkinsfile
vendored
16
Jenkinsfile
vendored
@ -163,22 +163,22 @@ podTemplate(
|
|||||||
git clone https://\${GIT_USERNAME}:\${GIT_TOKEN}@\${REPO_URL} manifest-repo
|
git clone https://\${GIT_USERNAME}:\${GIT_TOKEN}@\${REPO_URL} manifest-repo
|
||||||
cd manifest-repo
|
cd manifest-repo
|
||||||
|
|
||||||
# 각 서비스별 이미지 태그 업데이트 (sed 사용)
|
# overlays/dev/kustomization.yaml의 images 섹션 업데이트
|
||||||
cd hgzero-back/kustomize/base
|
cd hgzero-back/kustomize/overlays/dev
|
||||||
|
|
||||||
services="user meeting stt notification"
|
services="user meeting stt notification"
|
||||||
for service in \$services; do
|
for service in \$services; do
|
||||||
echo "Updating \$service image tag..."
|
echo "Updating \$service image tag in kustomization.yaml..."
|
||||||
sed -i "s|image: ${registry}/${imageOrg}/\$service:.*|image: ${registry}/${imageOrg}/\$service:${environment}-${imageTag}|g" \\
|
sed -i "s|name: ${registry}/${imageOrg}/\$service\$|name: ${registry}/${imageOrg}/\$service|g" kustomization.yaml
|
||||||
\$service/deployment.yaml
|
sed -i "/name: ${registry}\\/${imageOrg}\\/\$service\$/!b;n;s|newTag:.*|newTag: ${environment}-${imageTag}|" kustomization.yaml
|
||||||
|
|
||||||
# 변경 사항 확인
|
# 변경 사항 확인
|
||||||
echo "Updated \$service deployment.yaml:"
|
echo "Updated \$service image tag:"
|
||||||
grep "image: ${registry}/${imageOrg}/\$service" \$service/deployment.yaml
|
grep -A1 "name: ${registry}/${imageOrg}/\$service" kustomization.yaml
|
||||||
done
|
done
|
||||||
|
|
||||||
# Git 설정 및 푸시
|
# Git 설정 및 푸시
|
||||||
cd ../../..
|
cd ../../../..
|
||||||
git config user.name "Jenkins"
|
git config user.name "Jenkins"
|
||||||
git config user.email "jenkins@hgzero.com"
|
git config user.email "jenkins@hgzero.com"
|
||||||
git add .
|
git add .
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user