76 Star 479 Fork 92

开源中国 / Gitee Jenkins Plugin

2021-01-07 18:04
58426 yashin 1578915792 Yashin

新增特性:

  • 支持配置 PR 冲突时也能触发构建
2021-01-04 18:20
58426 yashin 1578915792 Yashin

增加特性:

  1. 支持commit 评论触发构建
  2. 支持 [ci-build] 指令触发构建
  3. 相同PR 频繁触发构建支持取消未完成的构建任务,进行当前构建

修复缺陷:

  1. 修复多仓库触发构建时,不同仓库相同PR id 被误判为相同构建而被取消构建的问题
2020-04-01 21:33
58426 yashin 1578915792 Yashin

修复:编辑、删除PR评论时,且改评论符合正则匹配要求时重复触发了构建

2019-11-15 20:40
58426 yashin 1578915792 Yashin
  • webhook URL 地址调整,避免与gitlab插件冲突

  • 可配置PR更新分支类型,以适应不同CI场景

预览版本
2018-08-16 16:05
58426 yashin 1578915792 Yashin

新增特性:为 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;
    }

预览版本
2018-07-30 16:42
58426 yashin 1578915792 Yashin
  • 修复评论触发PR链接不正确
  • 修复评论触发PR回评至码云失败
  • 增加支持配置 PR 不要求必须测试时过滤触发构建
预览版本
2018-07-27 22:23
58426 yashin 1578915792 Yashin
  • 支持评论 Pull Request 触发构建(可用于PR构建失败时手动评论PR重新触发构建)
预览版本
2018-07-26 19:32
58426 yashin 1578915792 Yashin
  • 修复无法合并PR问题
  • 修复 Pipeline 生成PR评论脚本无内容输入问题
预览版本
2018-07-26 10:16
58426 yashin 1578915792 Yashin
  1. 改动:
  • 支持过滤已构建的 commit 版本
  • 删除PR WIP 过滤
  1. 支持特性:
  • 推送代码到码云时,由配置的 WebHook 触发 Jenkins 任务构建。
  • 提交 Pull Request 到码云项目时,由配置的 WebHook 触发 Jenkins 任务构建,支持PR动作:新建,更新,接受,关闭,审查通过,测试通过。
  • 支持 [ci-skip] 指令过滤。
  • 过滤已经构建的 Commit 版本,若是分支 Push,则相同分支Push才过滤,若是 PR,则是同一个PR才过滤。
  • 按分支名过滤触发器。
  • 正则表达式过滤可触发的分支。
  • 设置 WebHook 验证密码。
  • 构建后操作可配置 PR 触发的构建结果评论到码云对应的PR中。
  • 构建后操作可配置 PR 触发的构建成功后可自动合并对应PR。
  • 对于 PR 相关的所有事件,若 PR 代码冲突不可自动合并,则不触发构建;且若配置了评论到PR的功能,则评论到 PR 提示冲突。
预览版本
2018-07-23 10:23
Java
1
https://gitee.com/oschina/Gitee-Jenkins-Plugin.git
git@gitee.com:oschina/Gitee-Jenkins-Plugin.git
oschina
Gitee-Jenkins-Plugin
Gitee Jenkins Plugin

搜索帮助