修改流浪切换方式
This commit is contained in:
Vendored
+1
-1
@@ -166,7 +166,7 @@ pipeline {
|
||||
stage('切换流量') {
|
||||
steps {
|
||||
script {
|
||||
sh "${SSH_CMD} \"sed -i 's/proxy_pass http:\\/\\/\\(blue\\|green\\);/proxy_pass http:\\/\\/${env.DEPLOY_TARGET};/' ${REMOTE_DIR}/proxy_nginx.conf\""
|
||||
sh "${SSH_CMD} \"sed -i 's/proxy_pass http:\\/\\/\\(blue\\|green\\):80;/proxy_pass http:\\/\\/${env.DEPLOY_TARGET}:80;/' ${REMOTE_DIR}/proxy_nginx.conf\""
|
||||
sh "${SSH_CMD} 'docker exec ${CONTAINER_PREFIX}-nginx nginx -s reload'"
|
||||
echo "✅ 流量已切换到 ${env.DEPLOY_TARGET}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user