本文介绍了与Hudson的持续集成的工作流程是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我今天提到了哈德森。



我听说过以前的连续集成,但我不知道是什么是ci服务器。



Hudson真的很容易在Ubuntu中安装,几分钟后我设置了一个实例。



但是我不太明白ci服务器的工作流程,或者我应该如何使用它?



请告诉我如果你有ci的经验,谢谢



编辑:



我目前正在使用 > SCM ,我不知道如何使用 Hudson 的正确方法。



Mercurial插件 ,我创建了一个具有本地存储库的新作业。当我在仓库中提交时, Hudson 作业是用最新版本的源代码构建的。



我使用的是远程存储库,工作流程是什么?



是否像下面这样?


  1. 在存储库中设置 Hudson 作业

  2. Developer对存储库进行本地克隆

  3. 开发人员提交并推送更改

  4. 使用传入的更改集更新远程存储库

  5. 运行 Hudson 建立

可能有些事情我误解了,请帮我指出。 p>

解决方案

是连续集成软件的过程,即尽可能频繁地(最终在每一组变化之后)通过获得即时反馈来避免任何大规模集成和所有后续问题。



要实现持续集成,您首先需要自动化您的软件构建(其中构建意味着当然编译源,打包它们,但也编译测试,运行测试,运行质量检查等,任何有助于获得关于你的代码的健康的反馈)。然后,您需要触发基于特定事件(存储库中的更改,临时事件)的最新版本的源,生成报告并在失败时通过邮件,Twitter等发送通知。 p>

这正是CI引擎的责任:提供触发机制,能够获得最新版本的源,运行构建,生成和发布报告,发送通知。 CI引擎会实现这一点。



由于运行构建是CPU和磁盘密集型,CI引擎通常运行在专用机器(或甚至农场的机器,如果你想建立大量的项目)。



现在回到你的问题。运行Hudson后,请进行配置(管理Hudson>配置系统):设置JDK,构建工具等。然后设置 Hudson作业,并按照步骤操作:配置源代码库的位置,构建工具,触发器,通知通道,完成(你可以做更复杂的事情,但这是一个开始)。



有关设置的详细信息,请检查:




  • 官方 guide for more details。 <<




I am referred to Hudson today.

I have heard about continuous integration before, but I have no idea what the heck is a ci-server.

Hudson is really easy to install in Ubuntu and in several minutes I managed to set up an instance of it.

But I don't quite understand the workflow of a ci-server, or how am I supposed to use it?

Please tell me if you have experience about ci, thanks in advance.

Edit:

I am currently using Mercurial as my SCM, and I wonder what is the right way to use it with Hudson.

I have installed the Mercurial Plugin of Hudson, and I create a new job with a local repository. When I commit in the repository the Hudson job is built with the latest version of my source code.

If what I used is a remote repository, what's the workflow like?

Is it something like the following?

  1. Set up a Hudson job with the repository
  2. Developer makes a local clone of the repository
  3. Developer commit and push changes
  4. The remote repository update with the incoming changeset
  5. Run a Hudson build

There may be something I misunderstanded at all, please help me point it out.

解决方案

Continuous Integration is the process of "integrating software" continuously i.e. as frequently as possible (ultimately after each set of changes) to avoid any big-bang integration and all subsequent problems by getting immediate feedback.

To implement Continuous Integration, you first need to automate the build of your software (where build means of course compiling sources, packaging them, but also compiling tests, running the tests, running quality checks, etc, anything that will help to get feedback on the health of your code). Then you need to trigger the build on the latest version of the sources on a particular event (a change in the repository, a temporal event), to generate reports and to send notifications upon failure (by mail, twitter, etc).

And this is precisely the responsibility of a CI engine: offering trigger mechanisms, being able to get the latest version of the sources, running the build, generating and publishing reports, sending notifications. CI engines do implement this.

And because running a build is CPU and Disk intensive, CI engines usually run on a dedicated machine (or even a farm of machines if you want to build lots of projects).

Back to your question now. Once you've got Hudson running, configure it (Manage Hudson > Configure System): setup the JDK, build tools, etc. Then setup an Hudson Job and follow the steps: configure the location of the source repository, the build tool, the trigger, a notification channel and you're done (you can do more complex things but that's a start).

For more details on the setup, check:

这篇关于与Hudson的持续集成的工作流程是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-14 02:19