Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
loit-build-common
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
loit-Infrastructure
loit-build-common
Commits
5b138ae7
提交
5b138ae7
authored
5月 27, 2021
作者:
chenshiying
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[新增] 部署脚本更新
上级
ea6482d0
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
10 行增加
和
55 行删除
+10
-55
GeneratorScript.java
...src/main/java/com/loit/common/script/GeneratorScript.java
+10
-55
没有找到文件。
loit-build-component/loit-build-deploy-env/src/main/java/com/loit/common/script/GeneratorScript.java
浏览文件 @
5b138ae7
...
...
@@ -109,8 +109,8 @@ public class GeneratorScript {
model
.
put
(
"normalList"
,
frontInstanceDto
.
getNormalList
());
//创建政务网nginx配置
buildFrontZwwNginxConfig
(
frontInstanceDto
,
model
);
buildFrontHlwNginxConfig
(
frontInstanceDto
,
model
);
buildFrontZwwNginxConfig
(
model
);
buildFrontHlwNginxConfig
(
model
);
});
}
catch
(
Exception
e
)
{
...
...
@@ -267,65 +267,20 @@ public class GeneratorScript {
}
private
static
void
buildFrontZwwNginxConfig
(
FrontInstanceDto
frontInstanceDto
,
Map
model
)
{
String
serviceName
=
frontInstanceDto
.
getServiceName
();
//TODO
// if ("version-web".equals(serviceName)) {
// String serviceNameSub = "loit-" + serviceName.replace("-web", "").replace("-h5", "");
// model.put("serviceNameSub", serviceNameSub);
// String serviceNameCookie = "loit" + serviceName.replaceAll("-", "");
// model.put("serviceNameCookie", serviceNameCookie);
//
// //TODO
// List<String> grayList = new ArrayList<>();
// grayList.add("10.0.120.37:9125");
// grayList.add("10.0.120.128:9125");
//
// List<String> normalList = new ArrayList<>();
// normalList.add("10.0.120.37:9126");
// normalList.add("10.0.120.128:9126");
//
// model.put("grayList", grayList);
// model.put("normalList", normalList);
//
// String nginxConfig = FreeMarkerUtils.process("zww-nginx-upstream.ftl", model);
// System.out.println(nginxConfig);
// }
//
// if ("gray-server-web".equals(serviceName)) {
// String serviceNameSub = "loit-" + serviceName.replace("-web", "").replace("-h5", "");
// model.put("serviceNameSub", serviceNameSub);
// String serviceNameCookie = "loit" + serviceName.replaceAll("-", "");
// model.put("serviceNameCookie", serviceNameCookie);
//
// //TODO
// List<String> grayList = new ArrayList<>();
// grayList.add("10.0.120.135:9127");
// grayList.add("10.0.120.190:9127");
//
// List<String> normalList = new ArrayList<>();
// normalList.add("10.0.120.135:9128");
// normalList.add("10.0.120.190:9128");
//
// model.put("grayList", grayList);
// model.put("normalList", normalList);
//
// String nginxConfig = FreeMarkerUtils.process("zww-nginx-upstream.ftl", model);
// System.out.println(nginxConfig);
// }
private
static
void
buildFrontZwwNginxConfig
(
Map
model
)
{
String
nginxConfigDir
=
root_path_full
+
"\\zww-nginx.conf"
;
FileUtils
.
appendNewLine
(
nginxConfigDir
,
"----------------------------------"
+
model
.
get
(
"serviceName"
)
+
"----------------------------------"
);
String
nginxConfig
=
FreeMarkerUtils
.
process
(
"zww-nginx-upstream.ftl"
,
model
);
System
.
out
.
println
(
nginxConfig
);
FileUtils
.
appendNewLine
(
nginxConfigDir
,
nginxConfig
);
}
private
static
void
buildFrontHlwNginxConfig
(
FrontInstanceDto
frontInstanceDto
,
Map
model
)
{
private
static
void
buildFrontHlwNginxConfig
(
Map
model
)
{
String
nginxConfigDir
=
root_path_full
+
"\\hlw-nginx.conf"
;
FileUtils
.
appendNewLine
(
nginxConfigDir
,
"----------------------------------"
+
model
.
get
(
"serviceName"
)
+
"----------------------------------"
);
String
nginxConfig
=
FreeMarkerUtils
.
process
(
"hlw-nginx-upstream.ftl"
,
model
);
System
.
out
.
println
(
nginxConfig
);
FileUtils
.
appendNewLine
(
nginxConfigDir
,
nginxConfig
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论