Fetch the repository succeeded.
修复升级导致部分情况出现500的问题
新增特性:
修复 pipeline 无法取消相同PR构建的问题
增加特性:
修复缺陷:
修复:编辑、删除PR评论时,且改评论符合正则匹配要求时重复触发了构建
修复旧数据格式问题
webhook URL 地址调整,避免与gitlab插件冲突
可配置PR更新分支类型,以适应不同CI场景
更新 jackson-databind 版本,修复潜在漏洞
新增特性:为 WebHook 数据生成 Jenkins 环境变量。可使 Jenkins在构建过程中使用 WebHook的数据。例如 PR 触发的 WebHook 会携带 PR iid (PR在项目中的编号),那么 Jenkins 构建过程中可以使用环境变量 giteePullRequestIid 来引用该变量。
目前支持的环境变量见以下函数,其中不同的 WebHook 触发可能导致有些变量为空,具体请安装插件 EnvInject Plugin,于构建中查看 Environment Variables
public Map<String, String> getBuildVariables() {
MapWrapper<String, String> variables = new MapWrapper<>(new HashMap<String, String>());
variables.put("giteeBranch", branch);
variables.put("giteeSourceBranch", sourceBranch);
variables.put("giteeActionType", actionType.name());
variables.put("giteeUserName", userName);
variables.put("giteeUserEmail", userEmail);
variables.put("giteeSourceRepoHomepage", sourceRepoHomepage);
variables.put("giteeSourceRepoName", sourceRepoName);
variables.put("giteeSourceNamespace", sourceNamespace);
variables.put("giteeSourceRepoURL", sourceRepoUrl);
variables.put("giteeSourceRepoSshUrl", sourceRepoSshUrl);
variables.put("giteeSourceRepoHttpUrl", sourceRepoHttpUrl);
variables.put("giteePullRequestTitle", pullRequestTitle);
variables.put("giteePullRequestDescription", pullRequestDescription);
variables.put("giteePullRequestId", pullRequestId == null ? "" : pullRequestId.toString());
variables.put("giteePullRequestIid", pullRequestIid == null ? "" : pullRequestIid.toString());
variables.put("giteePullRequestTargetProjectId", pullRequestTargetProjectId == null ? "" : pullRequestTargetProjectId.toString());
variables.put("giteePullRequestLastCommit", lastCommit);
variables.put("giteePushCreated", created ? "true" : "false");
variables.put("giteePushDeleted", deleted ? "true" : "false");
variables.putIfNotNull("giteePullRequestState", pullRequestState);
variables.putIfNotNull("giteeMergedByUser", mergedByUser);
variables.putIfNotNull("giteePullRequestAssignee", pullRequestAssignee);
variables.put("giteeTargetBranch", targetBranch);
variables.put("giteeTargetRepoName", targetRepoName);
variables.put("giteeTargetNamespace", targetNamespace);
variables.put("giteeTargetRepoSshUrl", targetRepoSshUrl);
variables.put("giteeTargetRepoHttpUrl", targetRepoHttpUrl);
variables.put("giteeBefore", before);
variables.put("giteeAfter", after);
variables.put("ref", ref);
variables.put("beforeSha", beforeSha);
variables.put("isTag", isTag);
variables.put("sha", sha);
variables.put("status", status);
variables.put("stages", stages);
variables.put("createdAt", createdAt);
variables.put("finishedAt", finishedAt);
variables.put("duration", buildDuration);
variables.putIfNotNull("giteeTriggerPhrase", triggerPhrase);
return variables;
}
修复 Pipeline 触发构建失败