Skip to content

Commit 38c69a1

Browse files
V1.6.x (#27)
* 优化日期类代码 * 支持Codeup代码仓库 * 优化页面展示 * 支持自动部署环境 * v1.6.0
1 parent 63859f0 commit 38c69a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1617
-252
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ DHorse是一个轻量级、简单易用的云应用管理平台,具有多云
3232

3333
2.下载安装文件
3434

35-
[最新稳定版](https://gitee.com/i512team/dhorse/releases/download/v1.5.1/dhorse-v1.5.1-bin.tar.gz)
35+
[最新稳定版](https://gitee.com/i512team/dhorse/releases/download/v1.6.0/dhorse-v1.6.0-bin.tar.gz)
3636

3737
3.解压
3838

dhorse-agent/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.dhorse</groupId>
77
<artifactId>dhorse-parent</artifactId>
8-
<version>1.5.1</version>
8+
<version>1.6.0</version>
99
<relativePath>..</relativePath>
1010
</parent>
1111
<artifactId>dhorse-agent</artifactId>

dhorse-api/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.dhorse</groupId>
77
<artifactId>dhorse-parent</artifactId>
8-
<version>1.5.1</version>
8+
<version>1.6.0</version>
99
<relativePath>..</relativePath>
1010
</parent>
1111
<artifactId>dhorse-api</artifactId>

dhorse-api/src/main/java/org/dhorse/api/enums/CodeRepoTypeEnum.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public enum CodeRepoTypeEnum {
55
GITLAB(1, "GitLab"),
66
GITHUB(2, "GitHub"),
77
GITEE(3, "Gitee"),
8-
;
8+
CODEUP(4, "Codeup");
99

1010
private Integer code;
1111

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package org.dhorse.api.enums;
2+
3+
public enum CodeTypeEnum {
4+
5+
BRANCH(1, "分支"),
6+
TAG(2, "标签");
7+
8+
private Integer code;
9+
10+
private String value;
11+
12+
private CodeTypeEnum(Integer code, String value) {
13+
this.code = code;
14+
this.value = value;
15+
}
16+
17+
public Integer getCode() {
18+
return code;
19+
}
20+
21+
public String getValue() {
22+
return value;
23+
}
24+
}

dhorse-api/src/main/java/org/dhorse/api/enums/EnvExtTypeEnum.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ public enum EnvExtTypeEnum {
66
AFFINITY(2, "亲和容忍"),
77
HEALTH(3, "健康检查"),
88
LIFECYCLE(4, "生命周期"),
9-
PROMETHEUS(5, "Prometheus");
9+
PROMETHEUS(5, "Prometheus"),
10+
AUTO_DEPLOYMENT(6, "自动部署");
1011

1112
private Integer code;
1213

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package org.dhorse.api.param.app.branch;
2+
3+
import java.io.Serializable;
4+
5+
/**
6+
* 查询标签列表
7+
*
8+
* @author Dahai
9+
*/
10+
public class AppTagListParam implements Serializable {
11+
12+
private static final long serialVersionUID = 1L;
13+
14+
/**
15+
* 应用编号
16+
*/
17+
private String appId;
18+
19+
/**
20+
* 标签名称
21+
*/
22+
private String tagName;
23+
24+
public String getAppId() {
25+
return appId;
26+
}
27+
28+
public void setAppId(String appId) {
29+
this.appId = appId;
30+
}
31+
32+
public String getTagName() {
33+
return tagName;
34+
}
35+
36+
public void setTagName(String tagName) {
37+
this.tagName = tagName;
38+
}
39+
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package org.dhorse.api.param.app.env;
2+
3+
import java.io.Serializable;
4+
5+
/**
6+
* 查询参数模型
7+
*
8+
* @author 无双
9+
*/
10+
public class EnvAutoDeploymentQueryParam implements Serializable {
11+
12+
private static final long serialVersionUID = 1L;
13+
14+
/**
15+
* 应用编号
16+
*/
17+
private String appId;
18+
19+
/**
20+
* 环境编号
21+
*/
22+
private String envId;
23+
24+
public String getAppId() {
25+
return appId;
26+
}
27+
28+
public void setAppId(String appId) {
29+
this.appId = appId;
30+
}
31+
32+
public String getEnvId() {
33+
return envId;
34+
}
35+
36+
public void setEnvId(String envId) {
37+
this.envId = envId;
38+
}
39+
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
package org.dhorse.api.response.model;
2+
3+
/**
4+
* 环境自动配置配置
5+
*
6+
* @author 无双
7+
*/
8+
public class EnvAutoDeployment extends BaseDto {
9+
10+
private static final long serialVersionUID = 1L;
11+
12+
/**
13+
* 应用编号
14+
*/
15+
private String appId;
16+
17+
/**
18+
* 环境编号
19+
*/
20+
private String envId;
21+
22+
/**
23+
* 代码类型,见:{@link org.dhorse.api.enums.CodeTypeEnum}
24+
*/
25+
private Integer codeType;
26+
27+
/**
28+
* 分支(标签)名称
29+
*/
30+
private String branchName;
31+
32+
/**
33+
* cron表达式
34+
*/
35+
private String cron;
36+
37+
/**
38+
* 开启状态,见:{@link org.dhorse.api.enums.YesOrNoEnum}
39+
*/
40+
private Integer enable;
41+
42+
public String getAppId() {
43+
return appId;
44+
}
45+
46+
public void setAppId(String appId) {
47+
this.appId = appId;
48+
}
49+
50+
public String getEnvId() {
51+
return envId;
52+
}
53+
54+
public void setEnvId(String envId) {
55+
this.envId = envId;
56+
}
57+
58+
public Integer getCodeType() {
59+
return codeType;
60+
}
61+
62+
public void setCodeType(Integer codeType) {
63+
this.codeType = codeType;
64+
}
65+
66+
public String getBranchName() {
67+
return branchName;
68+
}
69+
70+
public void setBranchName(String branchName) {
71+
this.branchName = branchName;
72+
}
73+
74+
public String getCron() {
75+
return cron;
76+
}
77+
78+
public void setCron(String cron) {
79+
this.cron = cron;
80+
}
81+
82+
public Integer getEnable() {
83+
return enable;
84+
}
85+
86+
public void setEnable(Integer enable) {
87+
this.enable = enable;
88+
}
89+
90+
}

dhorse-api/src/main/java/org/dhorse/api/response/model/GlobalConfigAgg.java

+89-33
Original file line numberDiff line numberDiff line change
@@ -244,15 +244,9 @@ public static class CodeRepo extends BaseGlobalConfig {
244244

245245
private String type;
246246

247-
private String url;
248-
249-
private Integer authType;
250-
251-
private String authToken;
247+
private GitLab gitLab;
252248

253-
private String authName;
254-
255-
private String authPassword;
249+
private Codeup codeup;
256250

257251
public String getType() {
258252
return type;
@@ -262,46 +256,108 @@ public void setType(String type) {
262256
this.type = type;
263257
}
264258

265-
public String getUrl() {
266-
return url;
259+
public GitLab getGitLab() {
260+
return gitLab;
267261
}
268262

269-
public void setUrl(String url) {
270-
this.url = url;
263+
public void setGitLab(GitLab gitLab) {
264+
this.gitLab = gitLab;
271265
}
272266

273-
public Integer getAuthType() {
274-
return authType;
267+
public Codeup getCodeup() {
268+
return codeup;
275269
}
276270

277-
public void setAuthType(Integer authType) {
278-
this.authType = authType;
271+
public void setCodeup(Codeup codeup) {
272+
this.codeup = codeup;
279273
}
280274

281-
public String getAuthToken() {
282-
return authToken;
283-
}
275+
public static class GitLab {
276+
277+
private String url;
284278

285-
public void setAuthToken(String authToken) {
286-
this.authToken = authToken;
287-
}
279+
private Integer authType;
288280

289-
public String getAuthName() {
290-
return authName;
291-
}
281+
private String authToken;
292282

293-
public void setAuthName(String authName) {
294-
this.authName = authName;
295-
}
283+
private String authName;
296284

297-
public String getAuthPassword() {
298-
return authPassword;
299-
}
285+
private String authPassword;
300286

301-
public void setAuthPassword(String authPassword) {
302-
this.authPassword = authPassword;
287+
public String getUrl() {
288+
return url;
289+
}
290+
291+
public void setUrl(String url) {
292+
this.url = url;
293+
}
294+
295+
public Integer getAuthType() {
296+
return authType;
297+
}
298+
299+
public void setAuthType(Integer authType) {
300+
this.authType = authType;
301+
}
302+
303+
public String getAuthToken() {
304+
return authToken;
305+
}
306+
307+
public void setAuthToken(String authToken) {
308+
this.authToken = authToken;
309+
}
310+
311+
public String getAuthName() {
312+
return authName;
313+
}
314+
315+
public void setAuthName(String authName) {
316+
this.authName = authName;
317+
}
318+
319+
public String getAuthPassword() {
320+
return authPassword;
321+
}
322+
323+
public void setAuthPassword(String authPassword) {
324+
this.authPassword = authPassword;
325+
}
303326
}
304327

328+
public static class Codeup {
329+
330+
private String organizationId;
331+
332+
private String accessKey;
333+
334+
private String accessKeySecret;
335+
336+
public String getOrganizationId() {
337+
return organizationId;
338+
}
339+
340+
public void setOrganizationId(String organizationId) {
341+
this.organizationId = organizationId;
342+
}
343+
344+
public String getAccessKey() {
345+
return accessKey;
346+
}
347+
348+
public void setAccessKey(String accessKey) {
349+
this.accessKey = accessKey;
350+
}
351+
352+
public String getAccessKeySecret() {
353+
return accessKeySecret;
354+
}
355+
356+
public void setAccessKeySecret(String accessKeySecret) {
357+
this.accessKeySecret = accessKeySecret;
358+
}
359+
360+
}
305361
}
306362

307363
public static class Ldap extends BaseGlobalConfig {

0 commit comments

Comments
 (0)