无法通过 Jenkinsfile 中的curl 查看 BitBucket PR 评论中的附加文件

发布于 2025-01-16 21:52:36 字数 1286 浏览 2 评论 0原文

我正在尝试通过 Jenkinsfile 中的 curl 命令将 html 文件附加到 bitbucket PR 评论。这是我正在使用的curl命令 - curl -k -u $username:$pass -X POST $URL -H \"Content-Type: multipart/form-data\" -F "file=@/< ;obsolute_path>\index.html\"。使用--verbose,我在curl执行中没有看到任何错误,但我不确定该文件是否附加到bb。 生成 BB PR 评论

在此处输入图像描述

当我单击 index.html 时,我看到 com.atlassian.bitbucket.NoSuchObjectException

在此处输入图像描述

Jenkins 控制台显示curl --verbose 日志 - 输入图片此处描述

当我访问该附件端点时,它会抛出 HTTP 405 页面错误 在 --trace - 上,我可以看到 html 文件的内容,但无法弄清楚在 bb 中上传/附加的位置。 --trace 记录如下

在此处输入图像描述输入图片此处描述

我的 Bitbucket 版本是 7.8.1,API 1.0

I am trying to attach a html file to bitbucket PR comment via curl command from Jenkinsfile. Here is the curl command I am using - curl -k -u $username:$pass -X POST $URL -H \"Content-Type: multipart/form-data\" -F "file=@/<obsolute_path>\index.html\". With --verbose I see no errors in curl execution but I am not sure if the file is attached to bb.
BB PR comment generated

enter image description here

When I click index.html I see com.atlassian.bitbucket.NoSuchObjectException

enter image description here

Jenkins console showing curl --verbose logs -
enter image description here

When I access that attachment endpoint it throws HTTP 405 PAGE ERROR
On --trace - I can see the content of my html file but can't figure out where is the getting uploaded/attached in bb. --trace log below

enter image description here
enter image description here

My Bitbucket version is 7.8.1 and on API 1.0

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文