...
|
...
|
@@ -576,10 +576,10 @@ |
|
|
function addReleaseJob() {
|
|
|
var title = $("input[name='title']").val();
|
|
|
var demand = $("textarea[name='demand']").val();
|
|
|
var platform = $('input:radio[name=platform]:checked').val();
|
|
|
var envuronments = "";
|
|
|
|
|
|
var environments = "";
|
|
|
$('input[name="environment"]:checked').each(function () {
|
|
|
envuronments = envuronments + "," + $(this).val();//向数组中添加元素
|
|
|
environments = environments + "," + $(this).val();//向数组中添加元素
|
|
|
});
|
|
|
var project = "";
|
|
|
$('input[name="project"]:checked').each(function () {
|
...
|
...
|
@@ -606,7 +606,7 @@ |
|
|
localAlert("参数错误", "请选择平台");
|
|
|
return;
|
|
|
}
|
|
|
if (envuronments.length == 0) {
|
|
|
if (environments.length == 0) {
|
|
|
localAlert("参数错误", "请选择环境");
|
|
|
return;
|
|
|
}
|
...
|
...
|
@@ -618,13 +618,33 @@ |
|
|
localAlert("参数错误", "请选择测试");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
//发布方式
|
|
|
var projectDeployType=$("#projectDeployType").val();
|
|
|
if(projectDeployType=="git"){
|
|
|
if(!$("#inputBranch").val()){
|
|
|
localAlert("参数错误", "请选择git分支");
|
|
|
return;
|
|
|
}
|
|
|
}else if(projectDeployType=="image"){
|
|
|
if(!$("#imagesList").val()){
|
|
|
localAlert("参数错误", "请选择镜像文件");
|
|
|
return;
|
|
|
}
|
|
|
}else{
|
|
|
localAlert("参数错误", "请选择发布方式");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var param = {
|
|
|
title: title,
|
|
|
demand: demand,
|
|
|
platform: platform,
|
|
|
environment: envuronments,
|
|
|
environment: environments,
|
|
|
project: project,
|
|
|
projectDeployType:projectDeployType,
|
|
|
branch:$("#inputBranch").val(),
|
|
|
imageFile:$("#imagesList").val(),
|
|
|
sensitiveInterface: $("#sensitiveInterface").val(),
|
|
|
testProject: testProject,
|
|
|
projectType:$("input[name='projectTypes']:checked").val(),
|
...
|
...
|
|