Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Hudson-ci/development"

m
(Source control)
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{hudson|pageTitle=Information for Hudson Developers}}  
 
{{hudson|pageTitle=Information for Hudson Developers}}  
<div style="border: thin solid black; background-color: rgb(244, 255, 244); margin: 3px;"><div style="margin: 4px;">
+
 
This page is a work in progress, and is not yet complete.
+
</div></div>
+
 
= Introduction  =
 
= Introduction  =
  
Line 8: Line 6:
  
 
__TOC__  
 
__TOC__  
 +
 +
= Release Specific Pages =
 +
* Hudson 3.0.0 release
  
 
= Core Development  =
 
= Core Development  =
  
Development for Hudson as a whole is split into two overarching projects. The Hudson core and primary plug-ins are maintained here at Eclipse. Although anyone can pull the source code for this project contributions are slightly more controlled (see Submitting a Patch for Non-Committers). The other half of the project is the Hudson-Plugins project at Java.net. This project is open to anyone who wants to create and maintain a plugin. Generally the plugins are all licensed with the MIT license rather than the EPL. This article relates to the code associated with the Eclipse maintained codebase.<br>
+
Development for Hudson as a whole is split into two overarching projects. The Hudson core and primary plug-ins are maintained here at Eclipse. Although anyone can pull the source code for this project contributions are slightly more controlled (see Submitting a Patch for Non-Committers). The other half of the project is the Hudson-Plugins project at Java.net. This project is open to anyone who wants to create and maintain a plugin. Generally the plugins are all licensed with the MIT license rather than the EPL. This article relates to the code associated with the Eclipse maintained codebase.<br>  
  
 
==== Pre-Eclipse Code and Plug-ins  ====
 
==== Pre-Eclipse Code and Plug-ins  ====
  
If you want to build a version of Hudson that preceeds the Eclipse releases then further information about the source code can be found [[Hudson-ci/development/Old_Hudson|here]].
+
If you want to build a version of Hudson that preceeds the Eclipse releases then further information about the source code can be found [[Hudson-ci/development/Old Hudson|here]].  
  
 
== Source control  ==
 
== Source control  ==
  
The Hudson Project maintains it's source code in a series of GIT repositories which partition the project into modules. The list below shows the set of repositories.  
+
The Hudson Project maintains its source code in a series of GIT repositories which partition the project into modules. The list below shows the set of repositories.  
  
 
<br>  
 
<br>  
Line 27: Line 28:
 
| Hudson Core Platform  
 
| Hudson Core Platform  
 
| {{git|hudson|org.eclipse.hudson.core.git}}
 
| {{git|hudson|org.eclipse.hudson.core.git}}
|-
 
| Hudson REST Plugin
 
| {{git|hudson|org.eclipse.hudson.plugins.rest.git}}
 
|-
 
| Hudson REST client
 
| {{git|hudson|org.eclipse.hudson.clients.rest.git}}
 
 
|-
 
|-
 
| Hudson Plugin to Maven to create run and debug Hudson plugins  
 
| Hudson Plugin to Maven to create run and debug Hudson plugins  
 
| {{git|hudson|org.eclipse.hudson.maven-hpi-plugin.git}}
 
| {{git|hudson|org.eclipse.hudson.maven-hpi-plugin.git}}
|-
 
| Hudson GWT Support
 
| {{git|hudson|org.eclipse.hudson.support.gwt.git}}
 
|-
 
| Hudson JAXB Support
 
| {{git|hudson|org.eclipse.hudson.support.jaxb.git}}
 
|-
 
| Maven3 Plugin
 
| {{git|hudson|org.eclipse.hudson.plugins.maven3.git}}
 
|-
 
| Legacy Maven Plugin
 
| {{git|hudson|org.eclipse.hudson.plugins.legacy-maven.git}}
 
|-
 
| CVS Source Control Plugin
 
| {{git|hudson|org.eclipse.hudson.plugins.cvs.git}}
 
|-
 
| Subversion Source Contol Plugin
 
| {{git|hudson|org.eclipse.hudson.plugins.subversion.git}}
 
|
 
|-
 
| GIT Source Control Plugin
 
| {{git|hudson|org.eclipse.hudson.plugins.git.git}}
 
|-
 
| SSH Slaves Plugin
 
| {{git|hudson|org.eclipse.hudson.plugins.ssh-slaves.git}}
 
 
|-
 
|-
 
| Test Harness  
 
| Test Harness  
Line 70: Line 40:
 
| Hudson Tools to Create Native Installers  
 
| Hudson Tools to Create Native Installers  
 
| {{git|hudson|org.eclipse.hudson.tools.packaging.git}}
 
| {{git|hudson|org.eclipse.hudson.tools.packaging.git}}
|-
 
| Hudson Update Center Generator Tool
 
| {{git|hudson|org.eclipse.hudson.tools.updatecenter.git}}
 
 
|}
 
|}
  
Line 95: Line 62:
 
=== Building from Source  ===
 
=== Building from Source  ===
  
To Do
+
Once you have a copy of the Hudson source code you can run the standard build and tests using Maven:
 +
 
 +
<code>
 +
cd org.eclipse.hudson.core<br/>
 +
mvn clean install
 +
</code>
 +
 
 +
This will take a few minutes to run and should finish with a summary like this:
 +
 
 +
<code>
 +
[INFO] ------------------------------------------------------------------------<br/>
 +
[INFO] Reactor Summary:<br/>
 +
[INFO] <br/>
 +
[INFO] Hudson ............................................ SUCCESS [0.827s]<br/>
 +
[INFO] Hudson :: Test Utilities .......................... SUCCESS [2.266s]<br/>
 +
[INFO] Hudson :: Common Utilities ........................ SUCCESS [4.053s]<br/>
 +
[INFO] Hudson :: CLI ..................................... SUCCESS [2.106s]<br/>
 +
[INFO] Hudson :: Core .................................... SUCCESS [2:59.178s]<br/>
 +
[INFO] Hudson :: Inject (JSR-330 Strategy) ............... SUCCESS [16.043s]<br/>
 +
[INFO] Hudson :: Plugin Utilities ........................ SUCCESS [3.623s]<br/>
 +
[INFO] Hudson :: Service ................................. SUCCESS [28.108s]<br/>
 +
[INFO] Hudson :: jetty-war-executable .................... SUCCESS [1.816s]<br/>
 +
[INFO] Hudson :: War ..................................... SUCCESS [9.819s]<br/>
 +
[INFO] Hudson :: Test Framework .......................... SUCCESS [6.922s]<br/>
 +
[INFO] Hudson :: Plugin Parent POM ....................... SUCCESS [1.459s]<br/>
 +
[INFO] ------------------------------------------------------------------------<br/>
 +
[INFO] BUILD SUCCESS<br/>
 +
[INFO] ------------------------------------------------------------------------<br/>
 +
[INFO] Total time: 4:17.984s<br/>
 +
[INFO] Finished at: Tue Feb 26 20:06:54 GMT 2013<br/>
 +
[INFO] Final Memory: 97M/998M<br/>
 +
[INFO] ------------------------------------------------------------------------<br/>
 +
</code>
 +
 
 +
Hudson is now build and ready to run:
 +
 
 +
<code>
 +
org.eclipse.hudson.core&gt;java -jar hudson-war/target/hudson-war-3.0.1-SNAPSHOT.war
 +
</code>
  
 
=== Keeping in the Loop  ===
 
=== Keeping in the Loop  ===
  
As well as the [https://dev.eclipse.org/mailman/listinfo/hudson-dev Hudson Developers] mailing list you can also subscribe to the [https://dev.eclipse.org/mailman/listinfo/hudson-commits hudson-commits] mailing list to keep up with the latest checkins.  
+
As well as the [https://dev.eclipse.org/mailman/listinfo/hudson-dev Hudson Developers] mailing list you can also subscribe to the [https://dev.eclipse.org/mailman/listinfo/hudson-commits hudson-commits] mailing list to keep up with the latest checkins.
  
 
== Procedures  ==
 
== Procedures  ==
Line 109: Line 114:
 
=== Submitting a Patch for Non-Committers  ===
 
=== Submitting a Patch for Non-Committers  ===
  
Anyone is welcome to provide input into the Hudson project, the strict IP procedures of the Eclipse foundation do mean, however, that the repositories are not open to all for random commits. If you are not yet an Eclipse committer then any code or patch that you want to contribute will need to be attached to an Eclipse BugZilla record so that it's provinance can be tracked. If in doubt about what to do, just send a mail to the [mailto:hudson-dev@eclipse.org Hudson Developer List].<br>  
+
Anyone is welcome to provide input into the Hudson project, the strict IP procedures of the Eclipse foundation do mean, however, that the repositories are not open to all for random commits. If you are not yet an Eclipse committer then any code or patch that you want to contribute will need to be done through [https://git.eclipse.org/r Eclipse Gerrit Code Review] so that it's provenance can be tracked. If in doubt about what to do, just send a mail to the [mailto:hudson-dev@eclipse.org Hudson Developer List].<br>
 +
 
 +
==== Steps to setup Gerrit Account<br>  ====
 +
 
 +
*Register and create Eclipse account, if you don't have one already - https://dev.eclipse.org/site_login/createaccount.php
 +
*SignIn in to Gerrit with Eclipse account id - https://git.eclipse.org/r
 +
*Click on the "settings" button at the top left and add your SSH public key - https://git.eclipse.org/r/#/settings/ssh-keys
 +
 
 +
(Follow instructions here https://git.eclipse.org/r/Documentation/user-upload.html)<br>  
  
 
==== Building the Patch  ====
 
==== Building the Patch  ====
  
Let's suppose that you notice an incorrect URL in one of the help topics in the Hudson configuration page {{codeblock|git clone <nowiki>http://git.eclipse.org/gitroot/hudson/org.eclipse.hudson.core.git</nowiki>}}
+
Let's suppose that you notice an incorrect URL in one of the help topics in the Hudson configuration page&nbsp;
  
 
First ensure that git knows who you are (''Important as this information will be included in the patch'')  
 
First ensure that git knows who you are (''Important as this information will be included in the patch'')  
 
<pre>git config user.name "&lt;Your Name&gt;"  
 
<pre>git config user.name "&lt;Your Name&gt;"  
 
git config user.email "&lt;your_email@example.com&gt;" </pre>  
 
git config user.email "&lt;your_email@example.com&gt;" </pre>  
 +
Check out Hudson core
 +
<pre>git clone ssh://{sshusername}@git.eclipse.org:29418/hudson/org.eclipse.hudson.core.git
 +
</pre>
 
Then edit the file to correct the problem and test your changes of course. Once happy:  
 
Then edit the file to correct the problem and test your changes of course. Once happy:  
  
 
Double check the files marked as changed: {{codeblock|git status}}  
 
Double check the files marked as changed: {{codeblock|git status}}  
  
Add the changed file and generate the patch
+
Add the changed file and commit your changes
 
<pre>git add file_you_tweaked  
 
<pre>git add file_you_tweaked  
 
git commit -m "Amended broken URL"  
 
git commit -m "Amended broken URL"  
git format-patch origin
 
 
</pre>  
 
</pre>  
This will report back a patch file name e.g. Amended-broken-URL.patch which will be present in the directory that you generated the patch for. Attach this file to the relevant BugZilla record.  
+
==== Sending your code for review ====
 +
 
 +
Upload your modification to the Gerrit Code Review. More details [https://git.eclipse.org/r/Documentation/user-upload.html#push_create here ]<br>
 +
<pre>git push ssh://{sshusername}@git.eclipse.org:29418/hudson/org.eclipse.hudson.core.git HEAD:refs/for/master</pre>
 +
This will submit your patch for review. Some one from core team&nbsp; will review your patch and apply it to the core. <br>
 +
 
 +
<br>
 +
 
 +
=== Releasing a New Release in Eclipse  ===
 +
 
 +
*[[Hudson-ci/development/release admin tasks|Web admin tasks for release]]
  
 
=== Becoming a Committer  ===
 
=== Becoming a Committer  ===
  
Committers for the project are nominated on the basis of a meritocracy. You can read more about this in Eclipsepedia ([[becoming|Becoming a Committer]]). However, the key is to show your interest and value through contribution. Remember that it's not just hard-core code hacking in the guts of Hudson that needs to be done, opportunities to shine exist in all of the other areas of the project as well such as documentation and QA. Just pitch in and get involved.
+
Committers for the project are nominated on the basis of a meritocracy. You can read more about this in Eclipsepedia ([[Development Resources/Becoming a Committer|Becoming a Committer]]). However, the key is to show your interest and value through contribution. Remember that it's not just hard-core code hacking in the guts of Hudson that needs to be done, opportunities to shine exist in all of the other areas of the project as well such as documentation and QA. Just pitch in and get involved.  
  
 
= Background Information  =
 
= Background Information  =
  
 
*[[Hudson-ci/development/third party libraries|Third party libraries and plug-ins used by Hudson]]
 
*[[Hudson-ci/development/third party libraries|Third party libraries and plug-ins used by Hudson]]

Latest revision as of 03:18, 11 July 2014

Hudson Continuous Integration Server
Website
Download
Community
Mailing ListForumsIRCmattermost
Issues
OpenHelp WantedBug Day
Contribute
Browse Source
Hudson-bust.png Information for Hudson Developers











Introduction

This page provides information for developers who either want to contribute to (or understand) Hudson and those wanting to write plugins for Hudson (see also Extending Hudson)

Release Specific Pages

  • Hudson 3.0.0 release

Core Development

Development for Hudson as a whole is split into two overarching projects. The Hudson core and primary plug-ins are maintained here at Eclipse. Although anyone can pull the source code for this project contributions are slightly more controlled (see Submitting a Patch for Non-Committers). The other half of the project is the Hudson-Plugins project at Java.net. This project is open to anyone who wants to create and maintain a plugin. Generally the plugins are all licensed with the MIT license rather than the EPL. This article relates to the code associated with the Eclipse maintained codebase.

Pre-Eclipse Code and Plug-ins

If you want to build a version of Hudson that preceeds the Eclipse releases then further information about the source code can be found here.

Source control

The Hudson Project maintains its source code in a series of GIT repositories which partition the project into modules. The list below shows the set of repositories.


Hudson Core Platform org.eclipse.hudson.core.git (browse, stats, fork on OrionHub)
Hudson Plugin to Maven to create run and debug Hudson plugins org.eclipse.hudson.maven-hpi-plugin.git (browse, stats, fork on OrionHub)
Test Harness org.eclipse.hudson.test.harness.git (browse, stats, fork on OrionHub)
Hudson Selenium Based UI Tests org.eclipse.hudson.test.ui.git (browse, stats, fork on OrionHub)
Hudson Tools to Create Native Installers org.eclipse.hudson.tools.packaging.git (browse, stats, fork on OrionHub)

Working with the Source

To work with a particular module click on the link above for the repository that you want to work with. On the summary tab of that page you will see a section towards the bottom of the page (labelled Clone) which provides the list of clone targets.

For example, Hudson Core clone targets are:

To work with the source you should clone the appropriate repository:

For committers:
git clone ssh://dmills@git.eclipse.org/gitroot/hudson/org.eclipse.hudson.core.git
Where dmills in this case is the committer Eclipse Id
For non-committers:
git clone http://git.eclipse.org/gitroot/hudson/org.eclipse.hudson.core.git
When cloning from behind a firewall remember to set your HTTP_PROXY appropriately.
git config http.proxy "http://proxy.example.com:80"

Building from Source

Once you have a copy of the Hudson source code you can run the standard build and tests using Maven:

cd org.eclipse.hudson.core
mvn clean install

This will take a few minutes to run and should finish with a summary like this:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Hudson ............................................ SUCCESS [0.827s]
[INFO] Hudson :: Test Utilities .......................... SUCCESS [2.266s]
[INFO] Hudson :: Common Utilities ........................ SUCCESS [4.053s]
[INFO] Hudson :: CLI ..................................... SUCCESS [2.106s]
[INFO] Hudson :: Core .................................... SUCCESS [2:59.178s]
[INFO] Hudson :: Inject (JSR-330 Strategy) ............... SUCCESS [16.043s]
[INFO] Hudson :: Plugin Utilities ........................ SUCCESS [3.623s]
[INFO] Hudson :: Service ................................. SUCCESS [28.108s]
[INFO] Hudson :: jetty-war-executable .................... SUCCESS [1.816s]
[INFO] Hudson :: War ..................................... SUCCESS [9.819s]
[INFO] Hudson :: Test Framework .......................... SUCCESS [6.922s]
[INFO] Hudson :: Plugin Parent POM ....................... SUCCESS [1.459s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:17.984s
[INFO] Finished at: Tue Feb 26 20:06:54 GMT 2013
[INFO] Final Memory: 97M/998M
[INFO] ------------------------------------------------------------------------

Hudson is now build and ready to run:

org.eclipse.hudson.core>java -jar hudson-war/target/hudson-war-3.0.1-SNAPSHOT.war

Keeping in the Loop

As well as the Hudson Developers mailing list you can also subscribe to the hudson-commits mailing list to keep up with the latest checkins.

Procedures

Information for Committers

For general information about GIT at Eclipse refer to the GIT page in Eclipsepedia. This provides information on setting up SSH keys etc. Pay particular attention to the informtion on IP matters (Handling Git Contributions).

Submitting a Patch for Non-Committers

Anyone is welcome to provide input into the Hudson project, the strict IP procedures of the Eclipse foundation do mean, however, that the repositories are not open to all for random commits. If you are not yet an Eclipse committer then any code or patch that you want to contribute will need to be done through Eclipse Gerrit Code Review so that it's provenance can be tracked. If in doubt about what to do, just send a mail to the Hudson Developer List.

Steps to setup Gerrit Account

(Follow instructions here https://git.eclipse.org/r/Documentation/user-upload.html)

Building the Patch

Let's suppose that you notice an incorrect URL in one of the help topics in the Hudson configuration page 

First ensure that git knows who you are (Important as this information will be included in the patch)

git config user.name "<Your Name>" 
git config user.email "<your_email@example.com>" 

Check out Hudson core

git clone ssh://{sshusername}@git.eclipse.org:29418/hudson/org.eclipse.hudson.core.git

Then edit the file to correct the problem and test your changes of course. Once happy:

Double check the files marked as changed:
git status

Add the changed file and commit your changes

git add file_you_tweaked 
git commit -m "Amended broken URL" 

Sending your code for review

Upload your modification to the Gerrit Code Review. More details here

git push ssh://{sshusername}@git.eclipse.org:29418/hudson/org.eclipse.hudson.core.git HEAD:refs/for/master

This will submit your patch for review. Some one from core team  will review your patch and apply it to the core.


Releasing a New Release in Eclipse

Becoming a Committer

Committers for the project are nominated on the basis of a meritocracy. You can read more about this in Eclipsepedia (Becoming a Committer). However, the key is to show your interest and value through contribution. Remember that it's not just hard-core code hacking in the guts of Hudson that needs to be done, opportunities to shine exist in all of the other areas of the project as well such as documentation and QA. Just pitch in and get involved.

Background Information

Copyright © Eclipse Foundation, Inc. All Rights Reserved.