使用 Jenkins/Hudson 部署/持续集成 Symfony 2 应用程序
我开发了一个使用 Symfony 2 框架的应用程序。应用程序代码驻留在一个 Bundle 中,在我的本地计算机上,我刚刚下载了 Symfony2 标准发行版,并将 Bundle 添加到了教程中描述的 src 文件夹中,然后再适当地编辑配置/路由文件。从发展的角度来看,这对我很有帮助。
我现在开始考虑如何处理与部署到生产环境/持续集成设置有关的框架依赖性。我是否应该像迄今为止所必须的那样继续使用发行版,也许还可以使用 Phing 等构建工具来检查我的包和任何其他依赖项?或者我应该只查看 Github 上的 Symfony 源代码,并为我的应用程序维护自定义“发行版”?
我希望其他人也做过类似的事情,并且可以推荐一个最简单的解决方案!
谢谢。
I've developed an application which uses the Symfony 2 framework. The application code resides in a Bundle, and on my local machine I just downloaded the Symfony2 Standard Distribution and added the Bundle to the src folder as the tutorials describe, before editing the config / routing files appropriately. That's served me well from a development perspective.
I'm now starting to think about how to handle the framework dependencies with regards to deploying to a production environment / a continuous integration setup. Should I continue as I have to date, using a distribution and perhaps a build tool like Phing to check out my bundle and any other dependencies? Or should I be checking out only the Symfony source from Github, and maintain a custom 'distribution' for my application?
I'm hoping someone else has had to do a similar thing and can recommend a solution that works with minimum fuss!
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的测试是用 PHPUnit 编写的吗?如果是这样,您可以直接使用 ant 运行测试,然后从 jenkins 运行 Ant。在我的设置中,我有第二个项目,如果测试通过,它会更新我们的暂存环境中的 git checkout。我遇到了一堆问题,将所有这些都放在一起(主要围绕 github 密钥、用户权限、用户 shell 环境等),但 phpqa 工具工作得很好。我刚刚看到这篇文章,它似乎是关于让一切运行的最新指南:
http://edorian.posterous.com/setting-up-jenkins-for-php-projects< /a>
我有这个“Hello world”项目,其中包括一个工作 build.xml,如果 ant 和 PHP 工具设置正确,该项目应该可以工作:
https://github.com/canuckistani/JenkinsTest
Are your tests written with PHPUnit? If so you can run the tests directly using ant, and then run Ant from jenkins. In my set-up I then have a second project that updates the git checkout in our staging environment if the test passes. I ran into a bunch of issues duck-taping this all together ( mostly around github keys, user permissions, user shell environments, etc ) but the phpqa tools work very well. I just saw this post that seems like a more recent guide on getting everything running:
http://edorian.posterous.com/setting-up-jenkins-for-php-projects
I've got this 'Hello world' project including a working build.xml that should work if ant and the PHP tools are set up correctly:
https://github.com/canuckistani/JenkinsTest