Authored by jimi.ji

delete web deploy switch

... ... @@ -865,72 +865,73 @@
console.log(param);
//三个node项目发布灰度环境时,自动启用灰度,发布online环境时,自动关闭灰度
param.az2AutoSwitchOnlineCheck="";
if("yohoblk-wap"==param.project_name||"yohobuywap-node"==param.project_name||"yohobuy-node"==param.project_name){
$('#confirmSubmitDivId').modal('hide');
if(param.environment_name.indexOf("gray")<0){
//发布线上环境,则在发布成功后,自动切到online
param.az2AutoSwitchOnlineCheck="az2AutoSwitchOnlineCheck";
mirrorAndDeploy(param);
}else{
//发布灰度环境,自动启用灰度
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
title: "你确定执行发布吗",
backdrop: "static",
content: "发布开始前会自动启用az2-"+param.project_name+"灰度环境,确定发布?",
buttons: [{
text: "否",
className: "btn-danger",
onclick: function () {
dialog.dialog("hide");
$('#confirmSubmitDivId').modal('show');
}
}, {
text: "是",
className: "btn-success",
onclick: function () {
dialog.dialog("hide");
var layerSwitch=layer.open( {
type:3,
//area: ['800px', '500px'],
content:"灰度环境切换中",
time: 0 //不自动关闭
});
$.ajax({
type: "post",
url: contextPath+"/dockerBuild/switchDockerNodeAz2",
data: {
env:param.environment_name,
branch:param.branch_name,
project_name: param.project_name,
onlineOrGray:"gray"
},
dataType: "json",
success: function(resp){
layer.close(layerSwitch);
if(resp.code==200){
mirrorAndDeploy(param);
}else{
localAlert("错误","az2切换灰度环境失败:"+resp.message);
}
},
error: function(){
layer.close(layerSwitch);
localAlert("错误","az2切换灰度环境异常");
}
});
}
}]
});
}
}else{
mirrorAndDeploy(param);
}
mirrorAndDeploy(param);
// if("yohoblk-wap"==param.project_name||"yohobuywap-node"==param.project_name||"yohobuy-node"==param.project_name){
// $('#confirmSubmitDivId').modal('hide');
// if(param.environment_name.indexOf("gray")<0){
// //发布线上环境,则在发布成功后,自动切到online
// param.az2AutoSwitchOnlineCheck="az2AutoSwitchOnlineCheck";
// mirrorAndDeploy(param);
// }else{
// //发布灰度环境,自动启用灰度
// var dialog = $("<div>").appendTo($("body"));
// dialog.dialog({
// title: "你确定执行发布吗",
// backdrop: "static",
// content: "发布开始前会自动启用az2-"+param.project_name+"灰度环境,确定发布?",
// buttons: [{
// text: "否",
// className: "btn-danger",
// onclick: function () {
// dialog.dialog("hide");
// $('#confirmSubmitDivId').modal('show');
// }
// }, {
// text: "是",
// className: "btn-success",
// onclick: function () {
// dialog.dialog("hide");
//
// var layerSwitch=layer.open( {
// type:3,
// //area: ['800px', '500px'],
// content:"灰度环境切换中",
// time: 0 //不自动关闭
// });
//
// $.ajax({
// type: "post",
// url: contextPath+"/dockerBuild/switchDockerNodeAz2",
// data: {
// env:param.environment_name,
// branch:param.branch_name,
// project_name: param.project_name,
// onlineOrGray:"gray"
// },
// dataType: "json",
// success: function(resp){
// layer.close(layerSwitch);
// if(resp.code==200){
// mirrorAndDeploy(param);
// }else{
// localAlert("错误","az2切换灰度环境失败:"+resp.message);
// }
// },
// error: function(){
// layer.close(layerSwitch);
// localAlert("错误","az2切换灰度环境异常");
//
// }
// });
//
// }
// }]
// });
// }
//
// }else{
// mirrorAndDeploy(param);
// }
}
... ...