|
@@ -6,14 +6,15 @@ import cn.reghao.devops.mgr.mgr.builds.model.provider.CompilerConfigGroupSequenc
|
|
|
import cn.reghao.devops.mgr.admin.util.validator.ValidEnum;
|
|
import cn.reghao.devops.mgr.admin.util.validator.ValidEnum;
|
|
|
import cn.reghao.devops.mgr.admin.util.BaseEntity;
|
|
import cn.reghao.devops.mgr.admin.util.BaseEntity;
|
|
|
import lombok.*;
|
|
import lombok.*;
|
|
|
|
|
+import org.hibernate.annotations.LazyCollection;
|
|
|
|
|
+import org.hibernate.annotations.LazyCollectionOption;
|
|
|
import org.hibernate.validator.constraints.Length;
|
|
import org.hibernate.validator.constraints.Length;
|
|
|
import org.hibernate.validator.group.GroupSequenceProvider;
|
|
import org.hibernate.validator.group.GroupSequenceProvider;
|
|
|
|
|
|
|
|
-import javax.persistence.Column;
|
|
|
|
|
-import javax.persistence.Entity;
|
|
|
|
|
-import javax.persistence.Table;
|
|
|
|
|
|
|
+import javax.persistence.*;
|
|
|
import javax.validation.constraints.NotBlank;
|
|
import javax.validation.constraints.NotBlank;
|
|
|
import javax.validation.constraints.Pattern;
|
|
import javax.validation.constraints.Pattern;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 编译方式配置
|
|
* 编译方式配置
|
|
@@ -43,6 +44,10 @@ public class CompilerConfig extends BaseEntity {
|
|
|
private String versionCmd;
|
|
private String versionCmd;
|
|
|
@NotBlank(groups = { DockerCompiler.class}, message = "编译器版本命令不能为空")
|
|
@NotBlank(groups = { DockerCompiler.class}, message = "编译器版本命令不能为空")
|
|
|
private String compilerImage;
|
|
private String compilerImage;
|
|
|
|
|
+ @ElementCollection(targetClass = CompilerBind.class)
|
|
|
|
|
+ @LazyCollection(LazyCollectionOption.FALSE)
|
|
|
|
|
+ @CollectionTable(name = "devops_compiler_config_binds")
|
|
|
|
|
+ private List<CompilerBind> compilerBinds;
|
|
|
|
|
|
|
|
public interface NoneCompiler {
|
|
public interface NoneCompiler {
|
|
|
}
|
|
}
|
|
@@ -57,6 +62,6 @@ public class CompilerConfig extends BaseEntity {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public CompilerDto getCompilerDto() {
|
|
public CompilerDto getCompilerDto() {
|
|
|
- return new CompilerDto(this.type, this.name, this.homePath, this.compileCmd, this.compilerImage);
|
|
|
|
|
|
|
+ return new CompilerDto(this.type, this.name, this.homePath, this.compileCmd, this.compilerImage, this.compilerBinds);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|