Installing WebObjects and Wonder for Jenkins using WOJenkins
Last modified by Bastian Triller on 2013/05/21 17:19
WOJenkins
The easiest way to get started with using Jenkins to build your WebObjects projects is to make use of WOJenkins. WOJenkins is a set of shell scripts and Jenkins job configurations that should fit most WebObjects projects out-of-the-box, but they can also be modified to fit specific needs.
Installing WebObjects and Project Wonder Frameworks
Before you can build your framework or application you will need to have WebObjects, Project Wonder and woproject.jar installed on your Jenkins server. The WOJenkins scripts and job configurations depend upon all three of them being installed in the JENKINS_HOME/WOFrameworksRepository directory.
The quickest way to install everything you need is by using WOJenkins itself! Specifically, by using the WOJenkins InstallWOAndWOnder job configuration.
- Change directories 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_InstallWOAndWOnder.git Install_WebObjects_And_WonderSet correct ownership and permissions - If you used the Mac OSX Jenkins installer, the user and group that it will be using are both "jenkins"
- sudo chown -R jenkins:jenkins Install_WebObjects_And_WonderOpen 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 new Job.
You should see a new job called Install_WebObjects_And_Wonder. You'll see the following options:- The version of WebObjects to be downloaded from Apple and installed in JENKINS_HOME/WOFrameworksRepository/WebObjects
- The branch of Project WOnder that should be built after cloning the Project Wonder github repository.
- The build target for wonder that should be run. Usually you'll want the default of just the frameworks.
Troubleshooting WebObjects & Wonder Install
- If you get the following error: /var/folders/zz/zyxvpxvq6csfxvn_n0000004000001/T/hudson6582791585070315951.sh: line 2: /Users/Shared/Jenkins/Home/jobs/InstallWOAndWOnder/workspace/WOJenkins/Install/WebObjects/installWebObjects.sh/Users/Shared/Jenkins/Home/jobs/InstallWOAndWOnder/workspace/WOJenkins/Build/Wonder/WorkspaceSetupScripts/Git/setupWonderWorkspace.sh: Not a directory
Build step 'Execute shell' marked build as failure
Finished: FAILURE Check the Execute Shell Script task in the Build section of the job configuration in Jenkins to make sure the carriage return was not stripped from between the two scripts when it was imported into Jenkins. The task should look like exactly like this (with two commands, each one on its own line): - ${WORKSPACE}/WOJenkins/Install/WebObjects/installWebObjects.sh
${WORKSPACE}/WOJenkins/Build/Wonder/WorkspaceSetupScripts/Git/setupWonderWorkspace.shIf you did not have the Multi SCM plugin installed Jenkins will break the job by removing the tasks to clone WOJenkins and Project WOnder. To fix it:- Install the plugins under Jenkins -> Manage Jenkins -> Manage Plugins.
- Revert the changes made to the config.xml file by Jenkins by calling git reset --hard HEAD in the job directory
- Tell Jenkins to Reload Configuration from Disk as shown above.