mirror of
https://github.com/hwanny1128/HGZero.git
synced 2025-12-06 04:26:23 +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
|
||||
cd manifest-repo
|
||||
|
||||
# 각 서비스별 이미지 태그 업데이트 (sed 사용)
|
||||
cd hgzero-back/kustomize/base
|
||||
# overlays/dev/kustomization.yaml의 images 섹션 업데이트
|
||||
cd hgzero-back/kustomize/overlays/dev
|
||||
|
||||
services="user meeting stt notification"
|
||||
for service in \$services; do
|
||||
echo "Updating \$service image tag..."
|
||||
sed -i "s|image: ${registry}/${imageOrg}/\$service:.*|image: ${registry}/${imageOrg}/\$service:${environment}-${imageTag}|g" \\
|
||||
\$service/deployment.yaml
|
||||
echo "Updating \$service image tag in kustomization.yaml..."
|
||||
sed -i "s|name: ${registry}/${imageOrg}/\$service\$|name: ${registry}/${imageOrg}/\$service|g" kustomization.yaml
|
||||
sed -i "/name: ${registry}\\/${imageOrg}\\/\$service\$/!b;n;s|newTag:.*|newTag: ${environment}-${imageTag}|" kustomization.yaml
|
||||
|
||||
# 변경 사항 확인
|
||||
echo "Updated \$service deployment.yaml:"
|
||||
grep "image: ${registry}/${imageOrg}/\$service" \$service/deployment.yaml
|
||||
echo "Updated \$service image tag:"
|
||||
grep -A1 "name: ${registry}/${imageOrg}/\$service" kustomization.yaml
|
||||
done
|
||||
|
||||
# Git 설정 및 푸시
|
||||
cd ../../..
|
||||
cd ../../../..
|
||||
git config user.name "Jenkins"
|
||||
git config user.email "jenkins@hgzero.com"
|
||||
git add .
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user