调整生产配置
This commit is contained in:
parent
321b358adb
commit
94391a6f95
@ -13,7 +13,7 @@ server {
|
||||
index index.html;
|
||||
}
|
||||
location /console {
|
||||
proxy_pass http://console.local.svc.cluster.local/console;
|
||||
proxy_pass http://console.prod.svc.cluster.local/console;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
10
pipeline
10
pipeline
@ -1,12 +1,12 @@
|
||||
pipeline {
|
||||
|
||||
agent {
|
||||
label "prod"
|
||||
label "dev"
|
||||
}
|
||||
|
||||
environment {
|
||||
BUILD_IMAGE = "${sh(script:'echo -n halar:page-console-$(date +%Y%m%dv%H%M%S)', returnStdout: true)}"
|
||||
IMAGE_REP_TAG = "794038239327.dkr.ecr.ap-southeast-1.amazonaws.com/"
|
||||
BUILD_IMAGE = "${sh(script:'echo -n likei-dev:page-console-$(date +%Y%m%dv%H%M%S)', returnStdout: true)}"
|
||||
IMAGE_REP_TAG = "989328288674.dkr.ecr.ap-southeast-1.amazonaws.com/"
|
||||
K8S_NAMESPACE = "prod"
|
||||
K8S_DEPLOYMENT = "console-page"
|
||||
K8S_APP_LABEL = "console-page"
|
||||
@ -25,7 +25,7 @@ pipeline {
|
||||
}
|
||||
stage('Build image') {
|
||||
steps {
|
||||
sh "aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin 794038239327.dkr.ecr.ap-southeast-1.amazonaws.com"
|
||||
sh "aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin 989328288674.dkr.ecr.ap-southeast-1.amazonaws.com"
|
||||
sh "docker build -t ${BUILD_IMAGE} ."
|
||||
}
|
||||
}
|
||||
@ -38,7 +38,7 @@ pipeline {
|
||||
}
|
||||
stage('Apply') {
|
||||
steps {
|
||||
sh "kubectl -n ${K8S_NAMESPACE} set image deployment/${K8S_DEPLOYMENT} ${K8S_APP_LABEL}=${IMAGE_REP_TAG}"
|
||||
sh "kubectl -n ${K8S_NAMESPACE} set image deployment/${K8S_DEPLOYMENT} ${K8S_APP_LABEL}=${IMAGE_REP_TAG} --kubeconfig /data/kube/prod-config"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user