从 Subversion 主干在 GAE 中自动部署
我的团队正在开发一个 Java 应用程序,该应用程序将部署在 Google App Engine(GAE)上。目前我们使用 eclipse-plugin 在 GAE 中构建和部署代码。
但是,我想自动化(通过使用 cron 或 svn-post-commit 挂钩)此过程,以便在每次 scrum 会议之前将 subversion trunk 中的源代码自动部署在 GAE 中。我希望这最终会减轻我们程序员的负担,并帮助他们更多地关注应用程序逻辑。
请告诉我这是否可以使用 Java+GAE+Subversion
提前致谢
My team is developing a Java application which is to be deployed on Google App Engine(GAE). Currently we use the eclipse-plugin to build and deploy the code in GAE.
However, I would like to automate(by using cron or svn-post-commit hook) this process so that the source code in subversion trunk is automatically deployed in GAE before each scrum meeting. I hope this would eventually reduce the load on our programmers and help them to focus more on the application logic.
Please let me know if this is possible with Java+GAE+Subversion
thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您的团队应该使用持续集成工具,例如詹金斯。这也将解决您可能没有想到的下一个问题:它可以配置为在部署之前运行单元和集成测试。它有许多版本控制系统集成选项。
Your team should use a Continuous Integration tool, e.g. Jenkins. This will solve your next problems too, which you may not thought over: it can be configured to run unit and integration tests before deployment. It has many options for version control system integration.
这是可能的。这就是我对我的项目所做的。我还应该注意到,这个问题与 可以集成 Google AppEngine 和 Google Code 来实现持续集成吗? 它提供了几个您可以使用的很好的答案。
话虽这么说,我个人的做法是为 eclipse 项目设置 ant 构建,并使用 Jenkins 自动构建从 Subversion 更新代码并使用 ant 构建来构建它们。
然后,您可以使用 google 提供的 appcfg 和宏添加目标,以将构建的项目上传到 Google App Engine。有关在 Google App Engine 上使用 Ant 的更多详细信息,请参阅此处。
使用 Jenkins 等持续集成工具的一个好处是,您可以使用 JUnit 或您个人的测试风格添加自动化单元测试。从长远来看,这将为您的团队省去很多麻烦。
It is possible. This is what I did with my project. I should also note that this question is similar with another stackoverflow question in Possible to integrate Google AppEngine and Google Code for continuous integration? and it provides several good answer that you could use.
That being said, my personal approach is to set up ant build for the eclipse project, and use Jenkins to automatically update the code from Subversion and build them up using the ant build.
You could then add a target using appcfg and macro provided by google to upload your built project to Google App Engine. More details of using Ant on Google App Engine could be seen in here.
A bonus point of using continuous integration tools such as Jenkins is that you could add automated unit testing using JUnit or your personal testing flavor. It will save your team lots of headaches in the long run.
我在 GAE 中使用了 python,并且有一个 appcfg.py 脚本,可以使用一个命令来部署代码:
python appcfg.py update
这让我认为对于 Java 也必须有一些来自 Google 的脚本来部署应用程序。如果有的话,那么您要做的一定是一个用于 cron 作业的简单命令。
I used python for GAE and there is a appcfg.py script with which one can deploy the code with one command as -
python appcfg.py update
This makes me think that for Java as well there must be some script from Google to deploy applications. If there is one, then what you are trying to do must be a simple command which be used a cron job.