Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the workflow of Continuous Integration With Hudson?

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.

like image 333
satoru Avatar asked Apr 11 '10 13:04

satoru


People also ask

What is Continuous Integration workflow?

Continuous integration refers to the build and unit testing stages of the software release process. Every revision that is committed triggers an automated build and test. With continuous delivery, code changes are automatically built, tested, and prepared for a release to production.

Is Hudson used for Continuous Integration?

Hudson is a discontinued continuous integration (CI) tool written in Java, which runs in a servlet container such as Apache Tomcat or the GlassFish application server.

What is the correct order of the Continuous Integration process stages?

CI and CD are often represented as a pipeline, where new code enters on one end, flows through a series of stages (build, test, staging, production), and published as a new production release to end users on the other end. Each stage of the CI/CD pipeline is a logical unit in the delivery process.

How does Jenkins Continuous Integration work?

Continuous integration is a process in which all development work is integrated as early as possible. The resulting artifacts are automatically created and tested. This process allows to identify errors in an early stage of the project. The Jenkins build server is a tool to provide this functionality.


1 Answers

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:

  • The official Use Hudson guide for more details. << START HERE
  • Continuous Integration with Hudson - Tutorial.
  • Spot defects early with Continuous Integration.
like image 165
Pascal Thivent Avatar answered Sep 28 '22 00:09

Pascal Thivent