用于提交 hudson 构建工件的插件

发布于 2024-08-25 22:37:55 字数 30 浏览 6 评论 0原文

是否有可用的插件可以将构建工件提交回 SVN?

Are there any plugins available which will commit the build artifact back to SVN?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

别再吹冷风 2024-09-01 22:37:55

不幸的是,Svn Publisher 还没有真正完成,在我可以愤怒地使用它之前还需要做很多工作。

我发现我可以使用作为构建操作执行的 shell/cmd 脚本来完成我需要的操作(或者当然构建后也可以),尽管它并不是很理想。该脚本仅使用标准 svn 命令行函数,看起来像这样:

svn mkdir http://my.server:port/project/branches/buildArtifacts/${BUILD_ID}/ --username USERNAME --password PASSWORD -m "JIRA_ISSUE This is a commit message"

svn co http://my.server:port/project/branches/buildArtifacts/${BUILD_ID}/ BuildArtifacts --username USERNAME --password PASSWORD

cd BuildArtifacts
cp ../../build/${BUILD_ID}/*.xml .

svn add *

svn ci --username USERNAME --password PASSWORD -m "JIRA_ISSUE This is a commit message"

因此,我们在 Subversion 中为构建工件创建新文件夹,将其签出到本地(工作空间内)文件夹,复制我们想要的内容,svn add 这些项目然后将所有内容提交回来。

就我个人而言,我仍然不相信在 Subversion 中构建报告的好处,但我们需要持久存储这些信息——Jenkins 服务器不是一个好的存储库。

从长远来看,编写自定义插件或实际修复 Svn Publisher 将是更好的解决方案。

Unfortunately Svn Publisher is not really finished and requires quite a bit more work before I can use it in anger.

I've found I can do what I need with a shell/cmd script executed as a build action (or of course post-build would work), although it's not really ideal. The script just uses standard svn command line functions and looks something like:

svn mkdir http://my.server:port/project/branches/buildArtifacts/${BUILD_ID}/ --username USERNAME --password PASSWORD -m "JIRA_ISSUE This is a commit message"

svn co http://my.server:port/project/branches/buildArtifacts/${BUILD_ID}/ BuildArtifacts --username USERNAME --password PASSWORD

cd BuildArtifacts
cp ../../build/${BUILD_ID}/*.xml .

svn add *

svn ci --username USERNAME --password PASSWORD -m "JIRA_ISSUE This is a commit message"

So, we create the new folder for the build artifacts in Subversion, check it out to a local (in-workspace) folder, copy what we want in, svn add those items then commit everything back.

Personally, I am still not sold on the benefit of having build reports in Subversion, but we need to have persistent storage of this information -- the Jenkins server isn't a good repository for it.

Writing a custom plugin or actually fixing Svn Publisher would be a better solution long term.

如果没有 2024-09-01 22:37:55

我相信 svn 发布者 会满足您的需求。

I believe the svn publisher will meet your needs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文