- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们正在使用 ghprb在我们所有的 repo 协议(protocol)中,它很棒。不过,我希望能够将内容添加到 git 中显示的构建后信息中。我们使用 clover、findbugs 等,但大多数人都缺少这些的输出。
ghprb 可以很好地返回消息,例如
All is well — Build finished. n tests run, m skipped, k failed.
那里甚至还有一个指向 jenkins 工作的链接。
在 README 中,它暗示可以进行自定义。
You can extend the standard build comment message on github creating a comment file from shell console or any other jenkins plugin. Contents of that file will be added to the comment on GitHub. This is useful for posting some build dependent urls for users without access to the jenkins UI console.
但之后就没有更多细节了。有没有人设法添加/修改默认内容?
最佳答案
是的,您可以将任何自定义消息指定为默认内容。
有一个选项可以提及一个文件,其内容将被粘贴为作业的 pull 请求中的评论。
<commentFilePath>/home/jenkins/<Some Directory Name>/commit.log</commentFilePath>
您可以提及 commit.log(或您命名的任何文件)中的任何内容。
要记住的 Gist ->这个文件必须在 jenkins master 上,在 slave 上有文件会对你有所帮助。因此,作为前/后构建步骤,您需要创建此文件并填充内容,
例如
如果你想显示 cobertura 图来 pull 请求提交,你可以添加这个。
echo "CodeCoverage Trend" > commit.log
echo "<img src="https://<Your servername>.com/job/${JOB_NAME}/cobertura/graph">" >> commit.log
关于git - ghprb - 添加内容以构建状态消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33829536/
我们正在使用 ghprb在我们所有的 repo 协议(protocol)中,它很棒。不过,我希望能够将内容添加到 git 中显示的构建后信息中。我们使用 clover、findbugs 等,但大多数人
我是一名优秀的程序员,十分优秀!