使用Hudson将部署与部署分开

xzy*_*fer 6 php phing continuous-integration hudson

我们已经开始使用Hudson,目前的工作流程是:

checkout local> code> run tests> update> run tests> commit

而不是轮询,Hudson只是坐在那里直到我们实例化一个构建.然后:

在本地结账>运行Phing脚本

Phing脚本然后:

svn导出最新版本>运行测试(如果成功)>生成报告等..>压缩导出> scp到生产服务器> ..做魔术使网站生效...

这一切都运行良好和花花公子,但它并没有真正给我们任何类型的"升级"QA的能力,每个构建建立repo头修订.理想情况下,我们希望Hudson轮询或使用post commit hooks构建每个提交,并且:

checkout local>运行Phing任务运行测试,如果成功,生成报告等.

然后,能够手动将自动部署(通过Phing任务)实例化为"使用每个特定构建暂存QA环境或生产.并非每个提交都将部署到QA.

这个工作流程是否可能来自Hudson,或者我们是否需要在之后手动运行我们的部署Phing任务.

xzy*_*fer 2

I ended up doing something similar to Peter Schuetze suggestion. I used only the only job however. I use 3 build parameters, deploy (bool), environment (choice) and revision (text). I then altered my Phing scripts to only do deployments if the deploy parameter is true, in which case it will deploy the specified revision to the specified environment. By default deploy is false, revision is head and environment is staging. Now when Hudson polls svn, it sees the deploy parameter is false and bypasses the deployment tasks.