我如何让詹金斯建立一个Subversion版本库的每个修订版 [英] How do I get jenkins to build every revision of a subversion repository

查看:99
本文介绍了我如何让詹金斯建立一个Subversion版本库的每个修订版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用詹金斯每10分钟使用一次标准民意测验进行持续集成,并且效果很好.

We are using jenkins for continuous integration using a standard poll every 10 minute scheme, and it work fine.

现在,我想设置一个在repro中的每个修订版本上运行的作业,它将生成的内容或多或少是与特定提交相对应的二进制补丁.

Now I want to set up a job that is run on every revision in the repro, it will be generating something that is more or less a binary patch that corresponds to a specific commit.

我发现的唯一方法是在svnserver上使用后提交挂钩,在jenkins服务器上排队一个作业,但是我不愿意这样做,因为这会在防火墙中要求一个新的漏洞(并且我认为詹金斯将所有排队的工作分解为一个.)

The only way I have figured out is by using a post-commit hook on the svnserver that queue a job on the jenkins server, but I'd rather not do that since it would demand a new hole in the firewall (and I think that jenkins collapses all queued jobs into one).

推荐答案

我自己没有尝试过此方法,但是您可以使用其他构建来触发您的Subversion构建.

I haven't tried this myself, but you may be able to use another build to trigger your subversions builds.

例如,您可以设置一个版本,该版本每10分钟从您的Subversion存储库中进行一次标准轮询.然后让此版本确定自上次以来发生的所有新修订版本号.然后让它排队多个参数化的构建(每个修订版本一个).

For example you could setup a build that does standard polling every 10 minutes from your subversion repository. Then have this build determine all the new revision numbers that have happened since the last time. Then have it queue multiple parameterized build (one for each revision).

有多种方法可以做到这一点,但是如果我这样做的话,我可能会让主构建使用python构建步骤来计算所有修订,然后我将使用

There are a variety of ways to do this, but if I was doing it I would probably have the master build use a python build step to compute all the revisions and then I would use the parameterized trigger plugin to queue the secondary builds.

最后一步可能有点混乱,因为我不知道有哪个插件可以让您排队多个版本.这是蛮力的,但是您可以设置一系列构建变量(SVN_REV_1,SVN_REV_2等),然后设置多个触发器(每个潜在变量一个).只要您拥有更多的书,那么您曾经经历过新的修订,那么您应该很好. (注意:也许有更好的方法可以做到这一点)

This last step could be a bit messy because I don't know of any plugin that allows you to queue up multiple builds. It is brute force, but you could set a series of build variables (SVN_REV_1, SVN_REV_2, ...) and then setup several triggers (one for each of the potential variables). As long as you have more of them then you ever have come through as new revisions, you should be good. (note: there may be a better way to do this)

为帮助确保您不会错过任何一个,我建议您增加轮询以使其每分钟运行一次.我们在这里为其中一个版本执行类似的操作,而轮询的负担却更多,这从来都不是问题.

To help make sure you don't miss any of them, I would suggest increasing your polling to run every minute. We do something similar here for one of our builds and the load of polling more often has never been an issue.

这篇关于我如何让詹金斯建立一个Subversion版本库的每个修订版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆