76 Star 483 Fork 94

开源中国 / Gitee Jenkins Plugin

 / 详情

webHook触发流水线任务失败

已完成
缺陷
创建于  
2020-07-31 16:51

问题描述

webHook触发jenkins流水线任务构建失败
jenkins 手动触发任务构建正常

重现步骤

jenkins 版本2.250
流水线任务配置如下图
流水线配置
通过webhook触发错误如下

git ls-remote -h https://gitee.com/zjddwl/jenkins-script.git # timeout=10
Found match: refs/heads/master revision 5085517405aea4600740fcaa92a4ba79fef76491
using credential d4ab8025-da03-4ced-b7e9-8d23b4b20d36
git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
git config remote.origin.url https://gitee.com/zjddwl/jenkins-script.git # timeout=10
Fetching without tags
Fetching upstream changes from https://gitee.com/zjddwl/jenkins-script.git
git --version # timeout=10
using GIT_ASKPASS to set credentials 码云账号
git fetch --no-tags --progress https://gitee.com/zjddwl/jenkins-script.git +refs/heads/:refs/remotes/origin/ # timeout=10
git rev-parse remotes/origin/test_version^{commit} # timeout=10
ERROR: Checkout failed
hudson.plugins.git.GitException: Command "git rev-parse remotes/origin/test_version^{commit}" returned status code 128:
stdout: remotes/origin/test_version^{commit}

stderr: fatal: ambiguous argument 'remotes/origin/test_version^{commit}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2436)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2366)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2362)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1922)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1934)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:1036)
at hudson.plugins.git.GitAPI.revParse(GitAPI.java:324)
at hudson.plugins.git.RevisionParameterAction.toRevision(RevisionParameterAction.java:98)
at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1049)

评论 (7)

zach 创建了缺陷
展开全部操作日志

我也遇到了同样的问题,跟着https://gitee.com/help/articles/4193#article-header0 这个教程一步一步走,单分支结构,然后出现了remotes/origin/test_version^{commit}" returned status code 128:这个错误,比较好奇这个test_version是从哪里得到的

我也遇到了同样的问题,跟着https://gitee.com/help/articles/4193#article-header0 这个教程一步一步走,单分支结构,然后出现了remotes/origin/test_version^{commit}" returned status code 128:这个错误,比较好奇这个test_version是从哪里得到的

@韩萌 这个问题好像没人处理。。。 4天了还没人来解决

zach 任务状态待确认 修改为已确认

我用密码的方式成功了,但gitee的例程还是不行

Roger 负责人设置为sanm

@zach @韩萌 昨天已经发布一个版本修复了,再试试?

我也遇到了同样的问题,跟着https://gitee.com/help/articles/4193#article-header0 这个教程一步一步走,单分支结构,然后出现了remotes/origin/test_version^{commit}" returned status code 128:这个错误,比较好奇这个test_version是从哪里得到的

@韩萌 这个 test_version 是gitee 的webhook功能的模拟测试数据,是点击测试按钮或者新增一个webhook才出现的,可以按正常的push 或者pr的真实 webhook数据来验证jenkins构建过程

@Yashin 升级了插件还是报错

@Yashin 升级了插件还是报错

@zach 再来,新版本 1.1.14 修复了

Yashin 任务状态已确认 修改为已完成
Yashin 关联项目设置为公有云-架构
李智烽 关联项目公有云-架构 修改为架构支撑

登录 后才可以发表评论

状态
负责人
项目
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(3)
58426 yashin 1578915792
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

搜索帮助