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
- Change Directories - cd into JENKINS_HOME/jobs
- cd /Users/Shared/Jenkins/Home/jobs/Clone Job Configuration - from github.com repository
- 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.
- 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.
- Open the Job
You should see a new job called My_WebObjects_Project. - 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.- 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. - 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.
- "Primary" Ant task - Automated build properties, intended to build an Application
- SCM Tasks
- Run the Job