Multi-Project Jobs using WOJenkins

Last modified by Bastian Triller on 2012/08/24 19:57

Multi-Project or "All-in-One" jobs build both a WebObjects Application and any frameworks that the application depends upon in one job, simplifying dependency management, but making for a more complicated job definition.

WOJenkins

WOJenkins is a set of shell scripts and Jenkins job configurations developed specifically to make it easy to build WebObjects projects with Jenkins.

Building a WebObjects Framework or Application

Warning

Prerequisites

To make use of WOJenkins, you will need all of the following:

1. A running Jenkins server. Ideally setup and configured using the [[doc:documentation.Home.Deployment.Using Jenkins Build Server with WebObjects Projects.Installing and Configuring Jenkins.WebHome]] instructions.
1. [[Git SCM installed>>url:http://wiki.wocommunity.org/display/WO/Getting+Started+with+Git||shape="rect"]] on the Jenkins server.
1. The Jenkins [[Git Plugin>>url:https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin||shape="rect"]] installed
1. The Jenkins [[Multiple SCMs Plugin>>url:https://wiki.jenkins-ci.org/display/JENKINS/Multiple+SCMs+Plugin||shape="rect"]] installed
1. The requested version of WebObjects and Wonder frameworks installed using the WOJenkins job configuration described by the [[doc:documentation.Home.Deployment.Using Jenkins Build Server with WebObjects Projects.Installing WebObjects and Wonder for Jenkins using WOJenkins.WebHome]] page.

  1. Change Directories - cd into JENKINS_HOME/jobs 
  2. cd /Users/Shared/Jenkins/Home/jobs/Clone Job Configuration - from github.com repository 
  3. sudo git clone https://github.com/avendasora/WOJenkins_Job_WOProject_AllInOne_Git.git My_WebObjects_ProjectSet correct ownership and permissions - If you used the Mac OSX Jenkins installer, the Owner and Group that need to be assigned the job configuration are both "daemon". The existing permissions should be correct. 
  4. sudo chown -R daemon:daemon My_WebObjects_Project/Open Jenkins and tell it to reload the configuration files so it will see the new job.
    • From within Jenkins user interface, navigate to: Jenkins -> Manage Jenkins -> Reload Configuration from Disk
    • Call the reload URL: http://localhost:8080/reload - this link should work for a default install if you haven't turned on any security.
  5. Open the Job
     You should see a new job called My_WebObjects_Project.
  6. The [note] macro is a standalone macro and it cannot be used inline. Click on this message for details.
    Configure the Job

     Click the "Configure" link in the left column. There are two places where multi-project jobs differ from single-project jobs.
    1. SCM Tasks
       In the default settings there is one SCM task that clones a repository that contains both a WebObjects Framework and a WebObjects Application that are at the same level in the repository.
    2. Ant Tasks
       In the default settings there are two Ant tasks. One for building the Framework, and one for building the Application.
      • "Primary" Ant task - Automated build properties, intended to build an Application
         There can only be one Application Ant task that uses the runtime PROJECT_NAME parameter. It is possible to build additional applications as well by using additional "Framework" Ant tasks, but just targeting an application project instead of a framework project.
      • "Secondary" Ant tasks - Manually-defined build properties - usually used to build depended-upon frameworks
         In the example, there is just one framework Ant task specified, but you can define as many as you need. All information must be manually entered for frameworks. None of the runtime job parameters are used by framework Ant tasks.
  7. Run the Job