Skip to content

Commit

Permalink
git pull log
Browse files Browse the repository at this point in the history
delay log
build default git
  • Loading branch information
bwcx-jzy committed Sep 14, 2021
1 parent 989fa69 commit 2ec403d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
9 changes: 5 additions & 4 deletions modules/server/src/main/java/io/jpom/build/BuildManage.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,18 @@ private boolean packageFile() throws InterruptedException {

@Override
public void run() {
if (delay != null && delay > 0) {
// 延迟执行
ThreadUtil.sleep(delay, TimeUnit.SECONDS);
}
try {
if (!updateStatus(BuildModel.Status.Ing)) {
this.log("初始化构建记录失败,异常结束");
return;
}
try {
this.log("start build in file : " + FileUtil.getAbsolutePath(this.gitFile));
if (delay != null && delay > 0) {
// 延迟执行
this.log("Execution delayed by " + delay + " seconds");
ThreadUtil.sleep(delay, TimeUnit.SECONDS);
}
//
String branchName = buildModel.getBranchName();
this.log("repository clone pull from " + branchName);
Expand Down
6 changes: 5 additions & 1 deletion modules/server/src/main/java/io/jpom/util/GitUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,11 @@ public static void checkoutPull(String url, File file, String branchName, Creden
setProgressMonitor(new TextProgressMonitor(printWriter)).
call();
}
git.pull().setCredentialsProvider(credentialsProvider).call();
// 拉取新代码 pull
git.pull()
.setRemoteBranchName(branchName)
.setProgressMonitor(new TextProgressMonitor(printWriter))
.setCredentialsProvider(credentialsProvider).call();
} catch (TransportException t) {
checkTransportException(t);
throw t;
Expand Down
4 changes: 3 additions & 1 deletion web-vue/src/pages/build/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,9 @@ export default {
},
// 添加
handleAdd() {
this.temp = {};
this.temp = {
repoType: 0
};
this.branchList = [];
this.loadDispatchList();
this.loadNodeProjectList();
Expand Down
2 changes: 1 addition & 1 deletion web-vue/src/pages/node/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
</a-row>
</a-form-model-item>
<a-form-model-item label="绑定 SSH " prop="sshId">
<a-select v-model="temp.sshId" placeholder="节点协议">
<a-select v-model="temp.sshId" placeholder="请选择SSH">
<a-select-option v-for="ssh in sshList" :key="ssh.id" :disabled="ssh.disabled">{{ ssh.name }}</a-select-option>
</a-select>
</a-form-model-item>
Expand Down

0 comments on commit 2ec403d

Please sign in to comment.