Dawal,
Community Resources for Software Engineering
you are here: Home Tools & Products Rational BuildForge Setup the Freemind project in BuildForge

Login

Setup the Freemind project in BuildForge PDF Print E-mail
Sunday, 24 January 2010 18:59

This articles shows the creation of a project for the opensource software Freemind in BuildForge, with all associated steps.

We'll assume there you have access to the Management Console, and that an agent has already be installed somewhere (either on localhost or remote host).

Create a selector

We will need a selector to create a project, but if BuildForge has just been installed there should be none available in the interface.

You can either import the sample projects with their selectors, connectors, etc. or create your own with the guidelines provided in this article: how to create a selector for your host.


Create an environment

We'll need to set the JAVA_HOME environment variable to execute the ant build. For this we'll define a new environment named "Ant 1.7.1 Environment", and add a new environment variable named JAVA_HOME with value "/usr/lib/jvm/java-6-openjdk/".

bg_project_env.resized

 

Create a project

Go in "Project -> Add Project".

bf_project_01.resized

Fill in the following information:

  • Name: give your project a name (spaces allowed).
  • Class: how we will treat and delete files after a given delay. Here select "Brouillon" for our purpose.
  • Selector: how we will select hosts to run the jobs on. Here I selected Samarcande, which is a debian box.
  • Environment: environment variables to be set prior to execution of the job. We can select our Ant Environment or leave it blank -- the environment can be set at the step level as well.

Click Save.

BuildForge shows you the steps definition dialog, where we can add steps to get, build and test our project.

 

Add steps to the project

Steps are atomic actions to be executed in our process. For our project, we'll define two steps:

  • Get the sources from the Ant SVN repository, use a svn command for that.
  • Build sources with ant.

bf_project_02.resized

Click on "Add step" on top. 

The form has the following information:

  • Name: a name to quickly describe this step.
  • Directory: the path to go before executing the command.
  • Path: relative or absolute.
    • If relative, the directory setting is relative to the build directory (e.g. /home/guest/bfagent-7.1.0.0-0-0241/Ant_1.7.1/BUILD_5).
    • If absolute, the directory setting is relative to the agent home (e.g. /home/guest/bfagent-7.1.0.0-0-0241).
  • Command: the command to be executed for this step.
Fill in the values for the first step "Get sources":

bf_step_get_sources.resized

 

Click "Save step", then "Add step". Fill in the values for the second step "Build sources":

bf_step_build.resized

 

Click Save.

 

Run the job

Go to Projects, and click on the green arrow next to our Ant 1.7.1 project. This triggers a build in background.

Go to the Jobs section, and in the list of jobs look for the last build we executed. Click on its name.

bf_project_sucess.resized


Analyse results

By clicking on the steps, you'll get a more detailed log for the execution with parameters, environment variables, commands executed and output. The "Get sources" step shows the svn log and all files retrieved during checkout.

bf_project_sucess_get_sources.resized

Full log is attached to this article: bf_sucess_get_sources.txt.

The "Build sources" step shows the ant log.

bf_project_sucess_build.resized

 

Full log is attached to this article: bf_sucess_build.txt.

Notice the JAVA_HOME variable is set before the step execution.


Attachments:
FileDescriptionFile size
Download this file (bf_log_sucess_build.txt)bf_log_sucess_build.txtLog file of a successful build in BuildForge.6 Kb
Download this file (bf_log_sucess_get_sources.txt)bf_log_sucess_get_sources.txtLog file of a successful source control action in BuildForge.239 Kb
 

Add comment

Please respect this work and community, do not abuse it.


Security code
Refresh