mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-11-30 10:58:14 +08:00
fix 优化 在线构建新增配置文件环境变量测试(BUILD_CONFIG_BRANCH_NAME)
This commit is contained in:
parent
fc0de64185
commit
acc2427a88
@ -5,6 +5,7 @@
|
||||
### 🐞 解决BUG、优化功能
|
||||
|
||||
1. 【all】优化 解压工具支持多种编码格式(GBK、UTF8)(感谢@Again... . )
|
||||
2. 【server】优化 在线构建新增配置文件环境变量测试(`BUILD_CONFIG_BRANCH_NAME`)(感谢@阿克苏市姑墨信息科技有限公司)
|
||||
|
||||
------
|
||||
|
||||
|
@ -569,6 +569,8 @@ public class BuildExecuteService {
|
||||
taskData.environmentMapBuilder.put("BUILD_NAME", this.buildExtraModule.getName());
|
||||
taskData.environmentMapBuilder.put("BUILD_SOURCE_FILE", FileUtil.getAbsolutePath(this.gitFile));
|
||||
taskData.environmentMapBuilder.put("BUILD_NUMBER_ID", this.taskData.buildInfoModel.getBuildId() + "");
|
||||
// 配置的分支名称,可能存在模糊匹配的情况
|
||||
taskData.environmentMapBuilder.put("BUILD_CONFIG_BRANCH_NAME", this.taskData.buildInfoModel.getBranchName());
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -624,6 +626,7 @@ public class BuildExecuteService {
|
||||
}
|
||||
// 分支模式
|
||||
map.put("branchName", newBranchName);
|
||||
// 真实使用的分支名
|
||||
taskData.environmentMapBuilder.put("BUILD_BRANCH_NAME", newBranchName);
|
||||
logRecorder.system("repository [{}] clone pull from {}", branchName, newBranchName);
|
||||
result = (String[]) plugin.execute("pull", map);
|
||||
|
Loading…
Reference in New Issue
Block a user