Jenkins CI/CD 파이프라인 구축 완료

- Kustomize 기반 환경별 매니페스트 구성 (dev/staging/prod)
- Base 및 Overlay 구조로 환경별 설정 분리
- 각 환경별 Deployment, Service, ConfigMap, Secret 패치 적용
- Jenkinsfile 작성 (Gradle JDK21, SonarQube, Quality Gate 포함)
- 환경별 설정 파일 및 수동 배포 스크립트 생성
- Jenkins CI/CD 가이드 문서 및 검증 스크립트 작성
- DEV 환경 Ingress Host를 base와 동일하게 수정 (체크리스트 준수)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
hiondal
2025-09-12 19:09:05 +09:00
parent c9d99b34d6
commit 291306f5c7
67 changed files with 908 additions and 651 deletions
@@ -2,8 +2,9 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: cm-common
data:
CORS_ALLOWED_ORIGINS: "http://localhost:8081,http://localhost:8082,http://localhost:8083,http://localhost:8084,http://phonebill.20.214.196.128.nip.io"
CORS_ALLOWED_ORIGINS: "http://localhost:8081,http://localhost:8082,http://localhost:8083,http://localhost:8084,http://phonebill-dev.20.214.196.128.nip.io"
JWT_ACCESS_TOKEN_VALIDITY: "18000000"
JWT_REFRESH_TOKEN_VALIDITY: "86400000"
REDIS_PORT: "6379"
@@ -2,16 +2,18 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: api-gateway
spec:
replicas: 1
template:
spec:
containers:
- name: api-gateway
image: acrdigitalgarage01.azurecr.io/phonebill/api-gateway:dev-latest
resources:
requests:
memory: "256Mi"
cpu: "256m"
cpu: 256m
memory: 256Mi
limits:
memory: "1024Mi"
cpu: "1024m"
cpu: 1024m
memory: 1024Mi
@@ -2,16 +2,18 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: bill-service
spec:
replicas: 1
template:
spec:
containers:
- name: bill-service
image: acrdigitalgarage01.azurecr.io/phonebill/bill-service:dev-latest
resources:
requests:
memory: "256Mi"
cpu: "256m"
cpu: 256m
memory: 256Mi
limits:
memory: "1024Mi"
cpu: "1024m"
cpu: 1024m
memory: 1024Mi
@@ -2,16 +2,18 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: kos-mock
spec:
replicas: 1
template:
spec:
containers:
- name: kos-mock
image: acrdigitalgarage01.azurecr.io/phonebill/kos-mock:dev-latest
resources:
requests:
memory: "256Mi"
cpu: "256m"
cpu: 256m
memory: 256Mi
limits:
memory: "1024Mi"
cpu: "1024m"
cpu: 1024m
memory: 1024Mi
@@ -2,16 +2,18 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: product-service
spec:
replicas: 1
template:
spec:
containers:
- name: product-service
image: acrdigitalgarage01.azurecr.io/phonebill/product-service:dev-latest
resources:
requests:
memory: "256Mi"
cpu: "256m"
cpu: 256m
memory: 256Mi
limits:
memory: "1024Mi"
cpu: "1024m"
cpu: 1024m
memory: 1024Mi
@@ -2,16 +2,18 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: user-service
spec:
replicas: 1
template:
spec:
containers:
- name: user-service
image: acrdigitalgarage01.azurecr.io/phonebill/user-service:dev-latest
resources:
requests:
memory: "256Mi"
cpu: "256m"
cpu: 256m
memory: 256Mi
limits:
memory: "1024Mi"
cpu: "1024m"
cpu: 1024m
memory: 1024Mi
@@ -5,6 +5,7 @@ metadata:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "false"
spec:
ingressClassName: nginx
rules:
@@ -1,16 +1,46 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: phonebill-dev
metadata:
name: phonebill-dev
resources:
- ../../base
namespace: phonebill-dev
labels:
- pairs:
env: dev
images:
- name: acrdigitalgarage01.azurecr.io/phonebill/api-gateway
newTag: dev-latest
- name: acrdigitalgarage01.azurecr.io/phonebill/user-service
newTag: dev-latest
- name: acrdigitalgarage01.azurecr.io/phonebill/bill-service
newTag: dev-latest
- name: acrdigitalgarage01.azurecr.io/phonebill/product-service
newTag: dev-latest
- name: acrdigitalgarage01.azurecr.io/phonebill/kos-mock
newTag: dev-latest
patches:
# Common patches
- path: configmap-common-patch.yaml
target:
kind: ConfigMap
name: cm-common
- path: secret-common-patch.yaml
target:
kind: Secret
name: secret-common
- path: ingress-patch.yaml
target:
kind: Ingress
name: phonebill
# Deployment patches
- path: deployment-api-gateway-patch.yaml
target:
kind: Deployment
@@ -31,14 +61,8 @@ patches:
target:
kind: Deployment
name: kos-mock
- path: ingress-patch.yaml
target:
kind: Ingress
name: phonebill-ingress
- path: secret-common-patch.yaml
target:
kind: Secret
name: secret-common
# Secret patches
- path: secret-user-service-patch.yaml
target:
kind: Secret
@@ -50,21 +74,4 @@ patches:
- path: secret-product-service-patch.yaml
target:
kind: Secret
name: secret-product-service
images:
- name: acrdigitalgarage01.azurecr.io/phonebill/api-gateway
newTag: dev-latest
- name: acrdigitalgarage01.azurecr.io/phonebill/user-service
newTag: dev-latest
- name: acrdigitalgarage01.azurecr.io/phonebill/bill-service
newTag: dev-latest
- name: acrdigitalgarage01.azurecr.io/phonebill/product-service
newTag: dev-latest
- name: acrdigitalgarage01.azurecr.io/phonebill/kos-mock
newTag: dev-latest
namePrefix: dev-
commonLabels:
environment: dev
name: secret-product-service
@@ -2,6 +2,7 @@ apiVersion: v1
kind: Secret
metadata:
name: secret-bill-service
type: Opaque
stringData:
DB_HOST: "bill-inquiry-postgres-dev-postgresql"
@@ -2,6 +2,7 @@ apiVersion: v1
kind: Secret
metadata:
name: secret-common
type: Opaque
stringData:
JWT_SECRET: "nwe5Yo9qaJ6FBD/Thl2/j6/SFAfNwUorAY1ZcWO2KI7uA4bmVLOCPxE9hYuUpRCOkgV2UF2DdHXtqHi3+BU/ecbz2zpHyf/720h48UbA3XOMYOX1sdM+dQ=="
@@ -2,6 +2,7 @@ apiVersion: v1
kind: Secret
metadata:
name: secret-product-service
type: Opaque
stringData:
DB_HOST: "product-change-postgres-dev-postgresql"
@@ -2,6 +2,7 @@ apiVersion: v1
kind: Secret
metadata:
name: secret-user-service
type: Opaque
stringData:
DB_HOST: "auth-postgres-dev-postgresql"