更换生产环境的aws配置
This commit is contained in:
parent
d3b7d70da9
commit
0ddee4f660
@ -1,15 +1,15 @@
|
||||
pipeline {
|
||||
agent {
|
||||
label "prod"
|
||||
label "dev"
|
||||
}
|
||||
|
||||
environment {
|
||||
BUILD_IMAGE = "${sh(script:'echo -n halar:auth-$(date +%Y%m%dv%H%M%S)', returnStdout: true)}"
|
||||
BUILD_IMAGE = "${sh(script:'echo -n likei-dev:auth-$(date +%Y%m%dv%H%M%S)', returnStdout: true)}"
|
||||
JAR_FILE = ""
|
||||
JAR_SIZE = ""
|
||||
JAR_TARGET_DIR = "rc-auth/target"
|
||||
JAR_NAME = "rc-auth-*.jar"
|
||||
IMAGE_REP_TAG = "794038239327.dkr.ecr.ap-southeast-1.amazonaws.com/"
|
||||
IMAGE_REP_TAG = "989328288674.dkr.ecr.ap-southeast-1.amazonaws.com/"
|
||||
DOCKER_FILE = "rc-auth/Dockerfile"
|
||||
DOCKER_DIR = "rc-auth"
|
||||
K8S_NAMESPACE = "prod"
|
||||
@ -35,7 +35,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 --build-arg SERVICE_VERSION=${BUILD_IMAGE} -f ${DOCKER_FILE} -t ${BUILD_IMAGE} ${DOCKER_DIR}"
|
||||
}
|
||||
}
|
||||
@ -49,7 +49,7 @@ pipeline {
|
||||
stage('Apply') {
|
||||
steps {
|
||||
sh "pwd && whoami"
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
pipeline {
|
||||
agent {
|
||||
label "prod"
|
||||
label "dev"
|
||||
}
|
||||
|
||||
environment {
|
||||
BUILD_IMAGE = "${sh(script:'echo -n halar:gateway-$(date +%Y%m%dv%H%M%S)', returnStdout: true)}"
|
||||
BUILD_IMAGE = "${sh(script:'echo -n likei-dev:gateway-$(date +%Y%m%dv%H%M%S)', returnStdout: true)}"
|
||||
JAR_FILE = ""
|
||||
JAR_SIZE = ""
|
||||
JAR_TARGET_DIR = "rc-gateway/target"
|
||||
JAR_NAME = "rc-gateway-*.jar"
|
||||
IMAGE_REP_TAG = "794038239327.dkr.ecr.ap-southeast-1.amazonaws.com/"
|
||||
IMAGE_REP_TAG = "989328288674.dkr.ecr.ap-southeast-1.amazonaws.com/"
|
||||
DOCKER_FILE = "rc-gateway/Dockerfile"
|
||||
DOCKER_DIR = "rc-gateway"
|
||||
K8S_NAMESPACE = "prod"
|
||||
@ -35,7 +35,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 --build-arg SERVICE_VERSION=${BUILD_IMAGE} -f ${DOCKER_FILE} -t ${BUILD_IMAGE} ${DOCKER_DIR}"
|
||||
}
|
||||
}
|
||||
@ -48,7 +48,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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,7 +45,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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
pipeline {
|
||||
agent {
|
||||
label "prod"
|
||||
label "dev"
|
||||
}
|
||||
|
||||
environment {
|
||||
BUILD_IMAGE = "${sh(script:'echo -n halar:console-$(date +%Y%m%dv%H%M%S)', returnStdout: true)}"
|
||||
BUILD_IMAGE = "${sh(script:'echo -n likei-dev:console-$(date +%Y%m%dv%H%M%S)', returnStdout: true)}"
|
||||
JAR_FILE = ""
|
||||
JAR_SIZE = ""
|
||||
JAR_TARGET_DIR = "rc-service/rc-service-console/console-start/target"
|
||||
JAR_NAME = "rc-service-console-*.jar"
|
||||
IMAGE_REP_TAG = "794038239327.dkr.ecr.ap-southeast-1.amazonaws.com/"
|
||||
IMAGE_REP_TAG = "989328288674.dkr.ecr.ap-southeast-1.amazonaws.com/"
|
||||
DOCKER_FILE = "rc-service/rc-service-console/Dockerfile"
|
||||
DOCKER_DIR = "rc-service/rc-service-console"
|
||||
K8S_NAMESPACE = "prod"
|
||||
@ -35,7 +35,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 --build-arg SERVICE_VERSION=${BUILD_IMAGE} -f ${DOCKER_FILE} -t ${BUILD_IMAGE} ${DOCKER_DIR}"
|
||||
}
|
||||
}
|
||||
@ -48,7 +48,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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
pipeline {
|
||||
agent {
|
||||
label "prod"
|
||||
label "dev"
|
||||
}
|
||||
|
||||
environment {
|
||||
BUILD_IMAGE = "${sh(script:'echo -n halar:external-$(date +%Y%m%dv%H%M%S)', returnStdout: true)}"
|
||||
BUILD_IMAGE = "${sh(script:'echo -n likei-dev:external-$(date +%Y%m%dv%H%M%S)', returnStdout: true)}"
|
||||
JAR_FILE = ""
|
||||
JAR_SIZE = ""
|
||||
JAR_TARGET_DIR = "rc-service/rc-service-external/external-start/target"
|
||||
JAR_NAME = "rc-service-external-*.jar"
|
||||
IMAGE_REP_TAG = "794038239327.dkr.ecr.ap-southeast-1.amazonaws.com/"
|
||||
IMAGE_REP_TAG = "989328288674.dkr.ecr.ap-southeast-1.amazonaws.com/"
|
||||
DOCKER_FILE = "rc-service/rc-service-external/Dockerfile"
|
||||
DOCKER_DIR = "rc-service/rc-service-external"
|
||||
K8S_NAMESPACE = "prod"
|
||||
@ -35,7 +35,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 --build-arg SERVICE_VERSION=${BUILD_IMAGE} -f ${DOCKER_FILE} -t ${BUILD_IMAGE} ${DOCKER_DIR}"
|
||||
}
|
||||
}
|
||||
@ -48,7 +48,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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
pipeline {
|
||||
agent {
|
||||
label "prod"
|
||||
label "dev"
|
||||
}
|
||||
|
||||
environment {
|
||||
BUILD_IMAGE = "${sh(script:'echo -n halar:live-$(date +%Y%m%dv%H%M%S)', returnStdout: true)}"
|
||||
BUILD_IMAGE = "${sh(script:'echo -n likei-dev:live-$(date +%Y%m%dv%H%M%S)', returnStdout: true)}"
|
||||
JAR_FILE = ""
|
||||
JAR_SIZE = ""
|
||||
JAR_TARGET_DIR = "rc-service/rc-service-live/live-start/target"
|
||||
JAR_NAME = "rc-service-live-*.jar"
|
||||
IMAGE_REP_TAG = "794038239327.dkr.ecr.ap-southeast-1.amazonaws.com/"
|
||||
IMAGE_REP_TAG = "989328288674.dkr.ecr.ap-southeast-1.amazonaws.com/"
|
||||
DOCKER_FILE = "rc-service/rc-service-live/Dockerfile"
|
||||
DOCKER_DIR = "rc-service/rc-service-live"
|
||||
K8S_NAMESPACE = "prod"
|
||||
@ -35,7 +35,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 --build-arg SERVICE_VERSION=${BUILD_IMAGE} -f ${DOCKER_FILE} -t ${BUILD_IMAGE} ${DOCKER_DIR}"
|
||||
}
|
||||
}
|
||||
@ -48,7 +48,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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
pipeline {
|
||||
agent {
|
||||
label "prod"
|
||||
label "dev"
|
||||
}
|
||||
|
||||
environment {
|
||||
BUILD_IMAGE = "${sh(script:'echo -n halar:order-$(date +%Y%m%dv%H%M%S)', returnStdout: true)}"
|
||||
BUILD_IMAGE = "${sh(script:'echo -n likei-dev:order-$(date +%Y%m%dv%H%M%S)', returnStdout: true)}"
|
||||
JAR_FILE = ""
|
||||
JAR_SIZE = ""
|
||||
JAR_TARGET_DIR = "rc-service/rc-service-order/order-start/target"
|
||||
JAR_NAME = "rc-service-order-*.jar"
|
||||
IMAGE_REP_TAG = "794038239327.dkr.ecr.ap-southeast-1.amazonaws.com/"
|
||||
IMAGE_REP_TAG = "989328288674.dkr.ecr.ap-southeast-1.amazonaws.com/"
|
||||
DOCKER_FILE = "rc-service/rc-service-order/Dockerfile"
|
||||
DOCKER_DIR = "rc-service/rc-service-order"
|
||||
K8S_NAMESPACE = "prod"
|
||||
@ -35,7 +35,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 --build-arg SERVICE_VERSION=${BUILD_IMAGE} -f ${DOCKER_FILE} -t ${BUILD_IMAGE} ${DOCKER_DIR}"
|
||||
}
|
||||
}
|
||||
@ -48,7 +48,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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
pipeline {
|
||||
agent {
|
||||
label "prod"
|
||||
label "dev"
|
||||
}
|
||||
|
||||
environment {
|
||||
BUILD_IMAGE = "${sh(script:'echo -n halar:other-$(date +%Y%m%dv%H%M%S)', returnStdout: true)}"
|
||||
BUILD_IMAGE = "${sh(script:'echo -n likei-dev:other-$(date +%Y%m%dv%H%M%S)', returnStdout: true)}"
|
||||
JAR_FILE = ""
|
||||
JAR_SIZE = ""
|
||||
JAR_TARGET_DIR = "rc-service/rc-service-other/other-start/target"
|
||||
JAR_NAME = "rc-service-other-*.jar"
|
||||
IMAGE_REP_TAG = "794038239327.dkr.ecr.ap-southeast-1.amazonaws.com/"
|
||||
IMAGE_REP_TAG = "989328288674.dkr.ecr.ap-southeast-1.amazonaws.com/"
|
||||
DOCKER_FILE = "rc-service/rc-service-other/Dockerfile"
|
||||
DOCKER_DIR = "rc-service/rc-service-other"
|
||||
K8S_NAMESPACE = "prod"
|
||||
@ -35,7 +35,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 --build-arg SERVICE_VERSION=${BUILD_IMAGE} -f ${DOCKER_FILE} -t ${BUILD_IMAGE} ${DOCKER_DIR}"
|
||||
}
|
||||
}
|
||||
@ -48,7 +48,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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
pipeline {
|
||||
agent {
|
||||
label "prod"
|
||||
label "dev"
|
||||
}
|
||||
|
||||
environment {
|
||||
BUILD_IMAGE = "${sh(script:'echo -n halar:wallet-$(date +%Y%m%dv%H%M%S)', returnStdout: true)}"
|
||||
BUILD_IMAGE = "${sh(script:'echo -n likei-dev:wallet-$(date +%Y%m%dv%H%M%S)', returnStdout: true)}"
|
||||
JAR_FILE = ""
|
||||
JAR_SIZE = ""
|
||||
JAR_TARGET_DIR = "rc-service/rc-service-wallet/wallet-start/target"
|
||||
JAR_NAME = "rc-service-wallet-*.jar"
|
||||
IMAGE_REP_TAG = "794038239327.dkr.ecr.ap-southeast-1.amazonaws.com/"
|
||||
IMAGE_REP_TAG = "989328288674.dkr.ecr.ap-southeast-1.amazonaws.com/"
|
||||
DOCKER_FILE = "rc-service/rc-service-wallet/Dockerfile"
|
||||
DOCKER_DIR = "rc-service/rc-service-wallet"
|
||||
K8S_NAMESPACE = "prod"
|
||||
@ -35,7 +35,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 --build-arg SERVICE_VERSION=${BUILD_IMAGE} -f ${DOCKER_FILE} -t ${BUILD_IMAGE} ${DOCKER_DIR}"
|
||||
}
|
||||
}
|
||||
@ -48,7 +48,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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,7 +45,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