如何组织Java Web应用程序的临时部署?
我们有一个 Java Web 应用程序,以及许多使用它的开发人员。每个开发人员都在自己的分支中使用自己的功能。当功能准备就绪时 - 我们想要对其进行审查并进行直观测试(当然,在所有单元和集成测试都通过之后)。我们希望自动化此部署过程。理想情况下,我们希望让我们的开发人员只需在某处单击一个按钮即可将应用程序部署到 http://example.com/staging/branches/foo
(其中 branches/foo
code> 是开发人员在 SVN 存储库中的路径)。
然后,部署会被审核(主要由项目发起人审核),合并到 /trunk
中,并从临时服务器中删除。
我认为我不是第一个需要实现这种场景的人。有哪些工具和技术可以帮助我?
We have a Java web app, and a number of developers working with it. Every developer is working with his/her own feature, in its own branch. When the feature is ready - we want to review it and visually test (after all unit and integration tests are passed, of course). We want to automate this process of deployment. Ideally, we would like to let our developers click just one button somewhere to make the application deployed to http://example.com/staging/branches/foo
(where branches/foo
is developer's path in SVN repository).
Then, the deployment is reviewed (by project sponsors mostly), merged into /trunk
, and removed from the staging server.
I think that I'm not the first one who needs to implement such a scenario. What are the tools and technologies that may help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通常,我会使用阶段环境来测试“主干”(即一个版本的所有单独分支合并在一起)。造成这种情况的几个原因:
话虽如此,有很多用于自动构建/部署的好工具。在不了解有关构建设置和部署环境的任何情况下,标准设置可能包含构建服务器、maven 和 tomcat。构建服务器将执行构建并将生成的应用程序部署到测试服务器。如果您使用 maven 和 tomcat,有一个插件可用于此任务 (http: //mojo.codehaus.org/tomcat-maven-plugin/introduction.html)。有许多优秀的构建服务器以及对 Maven 的良好支持。 Teamcity 很受欢迎,Hudson CI。
Typically, I would use a stage environment to test the "trunk" (ie all the individual branches for a release merged together). Several reasons for this:
All that being said, there are lots of good tools for automatic build/deploy out there. Not knowing anything about your build setup and deployment environment, a standard setup could consist of a build-server, maven and tomcat. The build-server would execute the build and deploy the resulting appplication to the test-server. If you are using maven and tomcat, there is a plugin available for this task (http://mojo.codehaus.org/tomcat-maven-plugin/introduction.html). There are a number of good build-servers out there as well with good support for maven. Teamcity is popular, as is Hudson CI.
基本上你可以使用Hudson/Jenkins。
有多种方法可以使用一些插件来管理一台计算机上的多个部署,如下所述 在 Jenkins 用户上发帖,您只需管理这些多个部署成为开发人员正在处理的分支。
正如 @pap 所说,Hudson 和其他 CI 软件构建、测试(如果您有任何测试)并部署 Web 应用程序,您只需配置此过程即可。希望该链接有帮助。
Basically you can use Hudson/Jenkins.
There are ways to manage have multiple deployments on one machine with some plugins, as stated on the following post on Jenkins Users, you'll just have to manage those multiple deployments to be the branches the developers are working on.
As @pap said, Hudson and other CI software build, test (if you have any tests in it) and deploy webapps, you'll just have to configure this procedure. Hope the link is helpful.