Commit 9479ce19 authored by 黎博's avatar 黎博

pipeline实体类enable字段改成数据

parent d8ff13c1
......@@ -16,7 +16,7 @@ public class Pipeline {
private String serviceBranch;
private String serviceType;
private String namespace;
private String enable;
private Integer enable;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
......
......@@ -51,7 +51,7 @@ public class PipelineServiceImpl extends ServiceImpl<PipelineMapper, Pipeline> i
pipelineQueryWrapper.eq("service_branch", branch);
Pipeline pipeline = pipelineMapper.selectOne(pipelineQueryWrapper);
if (pipeline != null) {
if (pipeline.getEnable().equals("1")) {
if (pipeline.getEnable() == 1) {
log.info("pipeline中找到对应项目,且项目是启动状态,开始构建:{}", pipeline.toString());
Integer buildNum = jenkinsService.buildJenkinsJob(pipeline.getServiceType(), projectName, branch, pipeline.getNamespace());
String markdown = DingdingUtils.buildPipelineMarkdownMsg(projectName, branch, pipeline.getServiceType(), author, message, commitDate, pipeline.getNamespace(), buildNum.toString());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment