mirror of
https://github.com/hwanny1128/HGZero.git
synced 2025-12-06 10:16:24 +00:00
Jenkinsfile: Replace Kustomize with sed for manifest updates
- Remove curl dependency (not available in alpine/git) - Use sed to directly update deployment.yaml files - Change directory to hgzero-back/kustomize/base - Update services list: user, meeting, stt, notification Fix: curl not found error in manifest update stage
This commit is contained in:
parent
2d096265b5
commit
d01d4d0b5d
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
@ -163,21 +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
|
||||||
|
|
||||||
# Kustomize 설치
|
# 각 서비스별 이미지 태그 업데이트 (sed 사용)
|
||||||
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sh
|
cd hgzero-back/kustomize/base
|
||||||
chmod +x kustomize
|
|
||||||
|
|
||||||
# 각 서비스별 이미지 태그 업데이트
|
services="user meeting stt notification"
|
||||||
cd hgzero-back/kustomize/overlays/${environment}
|
|
||||||
|
|
||||||
services="user meeting stt ai notification"
|
|
||||||
for service in \$services; do
|
for service in \$services; do
|
||||||
echo "Updating \$service image tag..."
|
echo "Updating \$service image tag..."
|
||||||
../../../kustomize edit set image ${registry}/${imageOrg}/\$service:${environment}-${imageTag}
|
sed -i "s|image: ${registry}/${imageOrg}/\$service:.*|image: ${registry}/${imageOrg}/\$service:${environment}-${imageTag}|g" \\
|
||||||
|
\$service/deployment.yaml
|
||||||
|
|
||||||
|
# 변경 사항 확인
|
||||||
|
echo "Updated \$service deployment.yaml:"
|
||||||
|
grep "image: ${registry}/${imageOrg}/\$service" \$service/deployment.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