fix: deployment
This commit is contained in:
parent
5d2c500ff3
commit
cf2765296c
15
deployment/Jenkinsfile
vendored
15
deployment/Jenkinsfile
vendored
@ -7,7 +7,6 @@ def getImageTag() {
|
|||||||
return dateFormat.format(currentDate)
|
return dateFormat.format(currentDate)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
podTemplate(
|
podTemplate(
|
||||||
label: "${PIPELINE_ID}",
|
label: "${PIPELINE_ID}",
|
||||||
serviceAccount: 'jenkins',
|
serviceAccount: 'jenkins',
|
||||||
@ -30,11 +29,23 @@ podTemplate(
|
|||||||
|
|
||||||
stage("Get Source") {
|
stage("Get Source") {
|
||||||
checkout scm
|
checkout scm
|
||||||
|
|
||||||
|
// 환경변수 파일 확인 및 읽기
|
||||||
|
if (!fileExists('deployment/deploy_env_vars')) {
|
||||||
|
error "deployment/deploy_env_vars 파일이 없습니다!"
|
||||||
|
}
|
||||||
|
|
||||||
props = readProperties file: "deployment/deploy_env_vars"
|
props = readProperties file: "deployment/deploy_env_vars"
|
||||||
namespace = "${props.namespace}"
|
namespace = "${props.namespace}"
|
||||||
|
|
||||||
|
// 필수 환경변수 검증
|
||||||
|
if (!props.registry || !props.image_org || !props.namespace) {
|
||||||
|
error "필수 환경변수가 누락되었습니다. registry, image_org, namespace를 확인하세요."
|
||||||
|
}
|
||||||
|
|
||||||
echo "Registry: ${props.registry}"
|
echo "Registry: ${props.registry}"
|
||||||
echo "Image Org: ${props.image_org}"
|
echo "Image Org: ${props.image_org}"
|
||||||
|
echo "Namespace: ${namespace}"
|
||||||
echo "Image Tag: ${imageTag}"
|
echo "Image Tag: ${imageTag}"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,6 +88,8 @@ podTemplate(
|
|||||||
--build-arg REACT_APP_AUTH_URL="${props.auth_url}" \\
|
--build-arg REACT_APP_AUTH_URL="${props.auth_url}" \\
|
||||||
--build-arg REACT_APP_MEMBER_URL="${props.member_url}" \\
|
--build-arg REACT_APP_MEMBER_URL="${props.member_url}" \\
|
||||||
--build-arg REACT_APP_STORE_URL="${props.store_url}" \\
|
--build-arg REACT_APP_STORE_URL="${props.store_url}" \\
|
||||||
|
--build-arg REACT_APP_MENU_URL="${props.menu_url}" \\
|
||||||
|
--build-arg REACT_APP_SALES_URL="${props.sales_url}" \\
|
||||||
--build-arg REACT_APP_CONTENT_URL="${props.content_url}" \\
|
--build-arg REACT_APP_CONTENT_URL="${props.content_url}" \\
|
||||||
--build-arg REACT_APP_RECOMMEND_URL="${props.recommend_url}" \\
|
--build-arg REACT_APP_RECOMMEND_URL="${props.recommend_url}" \\
|
||||||
--build-arg BUILD_FOLDER="deployment/container" \\
|
--build-arg BUILD_FOLDER="deployment/container" \\
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# ConfigMap
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
@ -6,11 +7,13 @@ metadata:
|
|||||||
data:
|
data:
|
||||||
runtime-env.js: |
|
runtime-env.js: |
|
||||||
window.__runtime_config__ = {
|
window.__runtime_config__ = {
|
||||||
AUTH_URL: 'http://${ingress_host}/api/auth',
|
AUTH_URL: '${auth_url}',
|
||||||
MEMBER_URL: 'http://${ingress_host}/api/member',
|
MEMBER_URL: '${member_url}',
|
||||||
STORE_URL: 'http://${ingress_host}/api/store',
|
STORE_URL: '${store_url}',
|
||||||
CONTENT_URL: 'http://${ingress_host}/api/content',
|
MENU_URL: '${menu_url}',
|
||||||
RECOMMEND_URL: 'http://${ingress_host}/api/recommend'
|
SALES_URL: '${sales_url}',
|
||||||
|
CONTENT_URL: '${content_url}',
|
||||||
|
RECOMMEND_URL: '${recommend_url}'
|
||||||
};
|
};
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@ -1,34 +1,35 @@
|
|||||||
|
# deployment/deploy_env_vars
|
||||||
# smarketing-frontend 배포 환경변수 설정
|
# smarketing-frontend 배포 환경변수 설정
|
||||||
# 이 파일을 실제 환경에 맞게 수정하세요
|
# 이 파일을 실제 환경에 맞게 수정하세요
|
||||||
|
|
||||||
# Container Registry 설정
|
# Container Registry 설정
|
||||||
REGISTRY=acrdigitalgarage02.azurecr.io
|
registry=acrdigitalgarage02.azurecr.io
|
||||||
IMAGE_ORG=smarketing
|
image_org=smarketing
|
||||||
|
|
||||||
# Kubernetes 설정
|
# Kubernetes 설정
|
||||||
NAMESPACE=smarketing
|
namespace=smarketing
|
||||||
REPLICAS=1
|
replicas=1
|
||||||
EXPORT_PORT=18080
|
export_port=18080
|
||||||
|
|
||||||
# Gateway/Ingress 설정 (⭐ smarketing-backend와 동일한 IP 사용)
|
# Gateway/Ingress 설정 (⭐ smarketing-backend와 동일한 IP 사용)
|
||||||
INGRESS_HOST=smarketing.20.249.184.228.nip.io
|
ingress_host=smarketing.20.249.184.228.nip.io
|
||||||
|
|
||||||
# 리소스 설정
|
# 리소스 설정
|
||||||
RESOURCES_REQUESTS_CPU=256m
|
resources_requests_cpu=256m
|
||||||
RESOURCES_REQUESTS_MEMORY=256Mi
|
resources_requests_memory=256Mi
|
||||||
RESOURCES_LIMITS_CPU=1024m
|
resources_limits_cpu=1024m
|
||||||
RESOURCES_LIMITS_MEMORY=1024Mi
|
resources_limits_memory=1024Mi
|
||||||
|
|
||||||
# API URLs (⭐ smarketing-backend ingress를 통해 라우팅)
|
# API URLs (⭐ smarketing-backend ingress를 통해 라우팅)
|
||||||
# 현재 설정된 백엔드 API들과 일치
|
# 현재 설정된 백엔드 API들과 일치
|
||||||
AUTH_URL=http://smarketing.20.249.184.228.nip.io/api/auth
|
auth_url=http://smarketing.20.249.184.228.nip.io/api/auth
|
||||||
MEMBER_URL=http://smarketing.20.249.184.228.nip.io/api/member
|
member_url=http://smarketing.20.249.184.228.nip.io/api/member
|
||||||
STORE_URL=http://smarketing.20.249.184.228.nip.io/api/store
|
store_url=http://smarketing.20.249.184.228.nip.io/api/store
|
||||||
MENU_URL=http://smarketing.20.249.184.228.nip.io/api/menu
|
menu_url=http://smarketing.20.249.184.228.nip.io/api/menu
|
||||||
SALES_URL=http://smarketing.20.249.184.228.nip.io/api/sales
|
sales_url=http://smarketing.20.249.184.228.nip.io/api/sales
|
||||||
CONTENT_URL=http://smarketing.20.249.184.228.nip.io/api/content
|
content_url=http://smarketing.20.249.184.228.nip.io/api/content
|
||||||
RECOMMEND_URL=http://smarketing.20.249.184.228.nip.io/api/recommend
|
recommend_url=http://smarketing.20.249.184.228.nip.io/api/recommend
|
||||||
|
|
||||||
# GitHub 설정
|
# GitHub 설정
|
||||||
GITHUB_ORG=won-ktds
|
github_org=won-ktds
|
||||||
TEAMID=smarketing
|
teamid=smarketing
|
||||||
Loading…
x
Reference in New Issue
Block a user