Version 11

    obsoleted by HudsonCreateNewJob

     

    • Go to http://hudson.qa.jboss.com (you have to be behind redhat vpn to access the page).

    • Click on New Job

      • Give a job name

      • Select maven2 project if it's maven based project otherwise select free style project.

      • If there already exists a project similar to the one you are about to create, you can copy the config from that project by selecting "copy existing job" option

    • Config page is very intuitive. Please go through each option one by one and there are help for each configuration option. Here are things to watch for:

      • Discard old builds

        • Here you configure how many older builds you want to keep. This can be set as "keep last x builds" or "keep builds for x many days". We suggest to keep last 15 builds but feel free to change it to meet your need.

      • Tie your builds to a particular machine

        • For window builds, please select one of two window slaves we have.

        • For linux builds, at the moment please tie them to either linux or linux-express-lane. We currently use linux-express-lane for projects which are built rather quickly (less than 30 min) and need to be built more frequently.

     

      • Build Triggers

        • The option you want most of the time is "Poll SCM". The syntax of schedule is cron like syntax. For example: 5     means poll every 5 mins past the hour

        • Similarly, you can select "Build periodically" option as well if you want it to run at predefined time.

     

      • Build Environment

        • You can tell hudson to abort the build if it's stuck for some reason. Please set it to 30 min more than what it takes normally to be on safer side.

     

      • Build

        • If it's linux build and your build involves some linux shell commands, select execute shell option. Please see ScriptBasedHudsonJobConfiguration for more information. For an example, you can also take a look at configuration page of esb project at http://hudson.qa.jboss.com/hudson/job/jboss-esb-linux/configure.

        • For windows build, please take a look at http://hudson.qa.jboss.com/hudson/job/jboss-esb-windows/configure. For network storage aware slaves (curr dev29) h: is /qa/services and t: is /qa/tools so use utilities already deployed there.

        • If you want to create ant or maven based job, you can select those option instead. See AntBasedHudsonJobConfiguration for some details about ant.

        • If you want to build highly portable and flexible job, see groovy based job configuration HudsonGroovyBasedJobConfiguration.

     

      • Post Build Actions

        • If you want to store some of logs or files besides test result etc, please select this and specify where files are located. If all you care is the latest of these artifacts, click on advance option and select the check box that says discard all but the last successful artifact.

     

        • More than likely, your build will have junit test results. You can tell hudson to display these results by configuring publish junit test result. You have to point hudson to directory where test result xmls are.

     

        • If you want to trigger other projects once this project is done, give names of the projects that you want to get executed. We have hinbernate eap tests configured like this currently.

     

        • If your build process creates emma coverage.xml, point hudson to the file location and hudson will show you grpahical result of code coverage report and its trend.

     

        • E-mail notification: Provide space separated list of e-mails that will be notified. Default behavior is to send notification only when build fails or build succeeds after failing. For success builds in a row, hudson will not send e-mail. But you can select other options to meet your need if you want to get notified regardless of build status.

     

     

        • Publish build: Builds happen inside vpn and build results are not publicly available. If your project is .org project which is most likely, please select publish build action and choose build02 as public instance. You can also configure mail notification (sent when build is available in public hudson), using the email-ext plugin (see above). Once build is done, it will be publicly available at hudson.jboss.org where people can see test results, code coverage report and build artifacts if there are any.

     

      • Once you have configured, you can force a build right away or wait for triggers to kick in.

      • For any help, please send a mail to jboss-qa-internal.

     

    Things to consider:

     

    Stale Processes

     

    Please take extra care to not leave stale processes after build. From my experience the issue "can't delete file /" appears when there are stale processes having these temporary files opened.

     

    A plug-in is deployed that seems to work fine. But it doesn't work for the maven project type - only free style (even with maven) and multiple configuration project types.

     

    IP Bindings

     

    You are encouraged to use $MYTESTIP_1 and $MYTESTIP_2 when you need binding to a socket. If you use to join a multicast group, please use $MCAST_ADDR which should be unique among all hudson slaves.