Open Charles-Kai opened 5 years ago
提供配置如下: ssh : git@git.dev.tencent.com:wilsonlaw/agri-rural-economic.git 选择:收到 Merge/Pull Request 事件时触发构建 选择 Git, 进入 高级, 设置 Name 为 origin, 然后: 如果是私有项目, 设置 refspec 为 +refs/heads/:refs/remotes/origin/ +refs/merge//MERGE:refs/remotes/origin/merge/ 动作 (action):merge
@caochikai git 在命令行的出错信息中,用 ^
来表示 at
的意思。
在这里,git 表示找不到要求他构建的 ref 对应的版本树。
个人建议尝试不配置 refspec
进行尝试(这个东西很容易配错,我也不太会配)。
以及考虑提供 webhook 的内容(字符串)和 jenkins 配置(截图)以供我为你调查。
我们会花时间试图重现和解决这个问题。
请求头部 Request URL: http://193.112.139.184:8080/coding/nyj.indechy.com-test
Request method: POST
User-Agent: Coding.net Hook
X-Coding-Event: merge request
X-Coding-Delivery: d024ef95-9144-463b-9cef-81e59c40f82f
X-Coding-WebHook-Version: v2
内容 { "action": "merge", "number": 1106, "mergeRequest": { "id": 2613056, "url": "https://qcloud.coding.net/u/wilsonlaw/p/agri-rural-economic/git/merge/1106", "html_url": "https://qcloud.coding.net/u/wilsonlaw/p/agri-rural-economic/git/merge/1106", "patch_url": "https://qcloud.coding.net/u/wilsonlaw/p/agri-rural-economic/git/merge/1106.patch", "diff_url": "https://qcloud.coding.net/u/wilsonlaw/p/agri-rural-economic/git/merge/1106.diff", "number": 1106, "state": "ACCEPTED", "title": "导出表格 ", "body": "导出表格 \n\n", "user": { "id": 591419, "login": "CHEN271453865", "avatar_url": "https://dev.tencent.com/static/fruit_avatar/Fruit-15.png", "url": "https://qcloud.coding.net/api/user/key/CHEN271453865", "html_url": "https://qcloud.coding.net/u/CHEN271453865", "name": "1284629851@qq.com", "name_pinyin": "|1284629851@qq.com|1284629851@qq.com" }, "created_at": 1545129693000, "updated_at": 1545129693000, "merged_at": 1545129699822, "merge_commit_sha": "", "head": { "label": "wilsonlaw:fix-tongji-page93", "ref": "fix-tongji-page93", "sha": "961108e903bd29ab9530df8d75449017c4eb1f86", "user": { "id": 385499, "login": "wilsonlaw", "avatar_url": "https://dn-coding-net-production-static.qbox.me/35630f54-5b83-4ed6-a8a3-3f1c07fed9c1.jpg", "url": "https://qcloud.coding.net/api/user/key/wilsonlaw", "html_url": "https://qcloud.coding.net/u/wilsonlaw", "name": "广州景翰", "name_pinyin": "|gzjh|guangzhoujinghan" }, "repo": { "id": 2931349, "name": "agri-rural-economic", "full_name": "wilsonlaw/agri-rural-economic", "owner": { "id": 385499, "login": "wilsonlaw", "avatar_url": "https://dn-coding-net-production-static.qbox.me/35630f54-5b83-4ed6-a8a3-3f1c07fed9c1.jpg", "url": "https://qcloud.coding.net/api/user/key/wilsonlaw", "html_url": "https://qcloud.coding.net/u/wilsonlaw", "name": "广州景翰", "name_pinyin": "|gzjh|guangzhoujinghan" }, "private": true, "html_url": "agri-rural-economic", "description": "农业局项目\nagri - 农业\nresas", "fork": false, "url": "https://qcloud.coding.net/api/user/wilsonlaw/project/agri-rural-economic", "created_at": 1526091243000, "updated_at": 1543370948000, "clone_url": "https://git.dev.tencent.com/wilsonlaw/agri-rural-economic.git", "ssh_url": "git@git.dev.tencent.com:wilsonlaw/agri-rural-economic.git", "default_branch": "master" } }, "base": { "label": "wilsonlaw:develop", "ref": "develop", "sha": "6f78f91d17543787d19d10f812a199f505432175", "user": { "id": 385499, "login": "wilsonlaw", "avatar_url": "https://dn-coding-net-production-static.qbox.me/35630f54-5b83-4ed6-a8a3-3f1c07fed9c1.jpg", "url": "https://qcloud.coding.net/api/user/key/wilsonlaw", "html_url": "https://qcloud.coding.net/u/wilsonlaw", "name": "广州景翰", "name_pinyin": "|gzjh|guangzhoujinghan" }, "repo": { "id": 2931349, "name": "agri-rural-economic", "full_name": "wilsonlaw/agri-rural-economic", "owner": { "id": 385499, "login": "wilsonlaw", "avatar_url": "https://dn-coding-net-production-static.qbox.me/35630f54-5b83-4ed6-a8a3-3f1c07fed9c1.jpg", "url": "https://qcloud.coding.net/api/user/key/wilsonlaw", "html_url": "https://qcloud.coding.net/u/wilsonlaw", "name": "广州景翰", "name_pinyin": "|gzjh|guangzhoujinghan" }, "private": true, "html_url": "agri-rural-economic", "description": "农业局项目\nagri - 农业\nresas", "fork": false, "url": "https://qcloud.coding.net/api/user/wilsonlaw/project/agri-rural-economic", "created_at": 1526091243000, "updated_at": 1543370948000, "clone_url": "https://git.dev.tencent.com/wilsonlaw/agri-rural-economic.git", "ssh_url": "git@git.dev.tencent.com:wilsonlaw/agri-rural-economic.git", "default_branch": "master" } }, "merged": true, "merged_by": { "id": 591419, "login": "CHEN271453865", "avatar_url": "https://dev.tencent.com/static/fruit_avatar/Fruit-15.png", "url": "https://qcloud.coding.net/api/user/key/CHEN271453865", "html_url": "https://qcloud.coding.net/u/CHEN271453865", "name": "1284629851@qq.com", "name_pinyin": "|1284629851@qq.com|1284629851@qq.com" }, "comments": 0, "commits": 1, "additions": 0, "deletions": 0, "changed_files": 14 }, "sender": { "id": 591419, "login": "CHEN271453865", "avatar_url": "https://dev.tencent.com/static/fruit_avatar/Fruit-15.png", "url": "https://qcloud.coding.net/api/user/key/CHEN271453865", "html_url": "https://qcloud.coding.net/u/CHEN271453865", "name": "1284629851@qq.com", "name_pinyin": "|1284629851@qq.com|1284629851@qq.com" }, "repository": { "id": 2931349, "name": "agri-rural-economic", "full_name": "wilsonlaw/agri-rural-economic", "owner": { "id": 385499, "login": "wilsonlaw", "avatar_url": "https://dn-coding-net-production-static.qbox.me/35630f54-5b83-4ed6-a8a3-3f1c07fed9c1.jpg", "url": "https://qcloud.coding.net/api/user/key/wilsonlaw", "html_url": "https://qcloud.coding.net/u/wilsonlaw", "name": "广州景翰", "name_pinyin": "|gzjh|guangzhoujinghan" }, "private": true, "html_url": "agri-rural-economic", "description": "农业局项目\nagri - 农业\nresas", "fork": false, "url": "https://qcloud.coding.net/api/user/wilsonlaw/project/agri-rural-economic", "created_at": 1526091243000, "updated_at": 1543370948000, "clone_url": "https://git.dev.tencent.com/wilsonlaw/agri-rural-economic.git", "ssh_url": "git@git.dev.tencent.com:wilsonlaw/agri-rural-economic.git", "default_branch": "master" } } 响应头部 Date: Tue, 18 Dec 2018 10:41:40 GMT
X-Content-Type-Options: nosniff
Content-Length: 0
Server: Jetty(9.4.z-SNAPSHOT)
内容 HTTP/1.1 200 OK
@wusisu 够全了吧
"Started by 无心s Merge Request #1064: 统计导出pdf增加龙头企业级别(feature-newjiance-api => develop) at Coding" Building in workspace /var/lib/jenkins/workspace/agri-rural-economic [WS-CLEANUP] Deleting project workspace... [WS-CLEANUP] Deferred wipeout is used... [WS-CLEANUP] Done Cloning the remote Git repository Cloning repository git@git.dev.tencent.com:wilsonlaw/agri-rural-economic.git
stderr: fatal: ambiguous argument '^{commit}': unknown revision or path not in the working tree. Use '--' to separate paths from revisions
hudson.plugins.git.GitException: Command "/usr/bin/git rev-parse ^{commit}" returned status code 128: stdout: ^{commit}
stderr: fatal: ambiguous argument '^{commit}': unknown revision or path not in the working tree. Use '--' to separate paths from revisions
Build step 'Deploy war/ear to a container' changed build result to NOT_BUILT Finished: NOT_BUILT