mirror of
https://github.com/cna-bootcamp/lifesub.git
synced 2026-01-21 11:06: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')
|
||||
]),
|
||||
containerTemplate(name: 'git',
|
||||
image: 'ghcr.io/chriswhong/git-yq:latest',
|
||||
image: 'alpine:3.19',
|
||||
command: 'cat',
|
||||
ttyEnabled: true)
|
||||
],
|
||||
@ -100,6 +100,13 @@ testcontainers.reuse.enable=true'''
|
||||
|
||||
stage('Update Manifests') {
|
||||
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(
|
||||
credentialsId: 'github-credentials',
|
||||
usernameVariable: 'GIT_USERNAME',
|
||||
@ -110,7 +117,6 @@ testcontainers.reuse.enable=true'''
|
||||
git config --global user.name "Jenkins"
|
||||
'''
|
||||
|
||||
// manifest 저장소를 https 프로토콜로 클론
|
||||
sh """
|
||||
rm -rf lifesub-manifest
|
||||
git clone https://oauth2:${GIT_PASSWORD}@github.com/${manifestRepo}.git
|
||||
@ -120,7 +126,6 @@ testcontainers.reuse.enable=true'''
|
||||
services.each { service ->
|
||||
def imagePath = "${props.registry}/${props.image_org}/${service}:${imageTag}"
|
||||
sh """
|
||||
# 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