mirror of
https://github.com/cna-bootcamp/lifesub.git
synced 2026-01-21 19:16:23 +00:00
argocd
This commit is contained in:
parent
68330ded2e
commit
f0526b281b
@ -25,7 +25,7 @@ podTemplate(
|
|||||||
envVar(key: 'TESTCONTAINERS_RYUK_DISABLED', value: 'true')
|
envVar(key: 'TESTCONTAINERS_RYUK_DISABLED', value: 'true')
|
||||||
]),
|
]),
|
||||||
containerTemplate(name: 'git',
|
containerTemplate(name: 'git',
|
||||||
image: 'ghcr.io/chriswhong/git-yq:latest',
|
image: 'alpine:3.19',
|
||||||
command: 'cat',
|
command: 'cat',
|
||||||
ttyEnabled: true)
|
ttyEnabled: true)
|
||||||
],
|
],
|
||||||
@ -100,6 +100,13 @@ testcontainers.reuse.enable=true'''
|
|||||||
|
|
||||||
stage('Update Manifests') {
|
stage('Update Manifests') {
|
||||||
container('git') {
|
container('git') {
|
||||||
|
// git과 yq 설치
|
||||||
|
sh '''
|
||||||
|
apk add --no-cache git curl
|
||||||
|
curl -L https://github.com/mikefarah/yq/releases/download/v4.40.5/yq_linux_amd64 -o /usr/local/bin/yq
|
||||||
|
chmod +x /usr/local/bin/yq
|
||||||
|
'''
|
||||||
|
|
||||||
withCredentials([usernamePassword(
|
withCredentials([usernamePassword(
|
||||||
credentialsId: 'github-credentials',
|
credentialsId: 'github-credentials',
|
||||||
usernameVariable: 'GIT_USERNAME',
|
usernameVariable: 'GIT_USERNAME',
|
||||||
@ -110,7 +117,6 @@ testcontainers.reuse.enable=true'''
|
|||||||
git config --global user.name "Jenkins"
|
git config --global user.name "Jenkins"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
// manifest 저장소를 https 프로토콜로 클론
|
|
||||||
sh """
|
sh """
|
||||||
rm -rf lifesub-manifest
|
rm -rf lifesub-manifest
|
||||||
git clone https://oauth2:${GIT_PASSWORD}@github.com/${manifestRepo}.git
|
git clone https://oauth2:${GIT_PASSWORD}@github.com/${manifestRepo}.git
|
||||||
@ -120,7 +126,6 @@ testcontainers.reuse.enable=true'''
|
|||||||
services.each { service ->
|
services.each { service ->
|
||||||
def imagePath = "${props.registry}/${props.image_org}/${service}:${imageTag}"
|
def imagePath = "${props.registry}/${props.image_org}/${service}:${imageTag}"
|
||||||
sh """
|
sh """
|
||||||
# deployment yaml 파일의 이미지 태그 업데이트
|
|
||||||
yq -i '.spec.template.spec.containers[0].image = "${imagePath}"' lifesub/deployments/${service}-deployment.yaml
|
yq -i '.spec.template.spec.containers[0].image = "${imagePath}"' lifesub/deployments/${service}-deployment.yaml
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user