Authored by qinchao

发布-通告镜像-

... ... @@ -43,11 +43,21 @@ public class ReleaseWorkJob {
private String project;
/**
* 发布方式:git分支,image镜像文件
*/
private String projectDeployType;
/**
* 分支
*/
private String branch;
/**
* 镜像文件名称
*/
private String imageFile;
/**
* 敏感接口
*/
private String sensitiveInterface;
... ...
... ... @@ -29,8 +29,8 @@ public class ProjectEnvironment {
dockerProjectTypeMap.put("ops","ops");
dockerProjectTypeMap.put("erp","erp");
projectDeployTypeMap.put("git","Git分支");
projectDeployTypeMap.put("image","Docker镜像");
projectDeployTypeMap.put("git","git分支");
projectDeployTypeMap.put("image","镜像文件");
}
... ...
... ... @@ -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(),
... ...
... ... @@ -107,14 +107,30 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label"><strong>分支:</strong></label>
<div class="col-sm-8">
<input type="text" class="form-control" value=" ${workJob.branch}"
style='border-left:0px;border-top:0px;border-right:0px;border-bottom:1px '
readonly="readonly"/>
</div>
</div>
<c:choose>
<c:when test="${workJob.projectDeployType == 'image'}">
<div class="form-group">
<label class="col-sm-6 control-label"><strong>镜像文件:</strong></label>
<div class="col-sm-8">
<input type="text" class="form-control" value=" ${workJob.imageFile}"
style='border-left:0px;border-top:0px;border-right:0px;border-bottom:1px '
readonly="readonly"/>
</div>
</div>
</c:when>
<c:otherwise>
<div class="form-group">
<label class="col-sm-6 control-label"><strong>分支:</strong></label>
<div class="col-sm-8">
<input type="text" class="form-control" value=" ${workJob.branch}"
style='border-left:0px;border-top:0px;border-right:0px;border-bottom:1px '
readonly="readonly"/>
</div>
</div>
</c:otherwise>
</c:choose>
<div class="form-group">
<label class="col-sm-6 control-label"><strong>敏感接口:</strong></label>
... ...