Wiki source code of Installing WebObjects and Wonder for Jenkins using WOJenkins
Last modified by Bastian Triller on 2013/05/21 17:19
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | == WOJenkins == | ||
2 | |||
3 | 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. | ||
4 | |||
5 | {{note title="Prerequisites"}} | ||
6 | To make use of WOJenkins, you will need all of the following: | ||
7 | |||
8 | 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. | ||
9 | 1. [[Git SCM installed>>url:http://wiki.wocommunity.org/display/WO/Getting+Started+with+Git||shape="rect"]] on the Jenkins server. | ||
10 | 1. The Jenkins [[Git Plugin>>url:https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin||shape="rect"]] installed | ||
11 | 1. The Jenkins [[Multiple SCMs Plugin>>url:https://wiki.jenkins-ci.org/display/JENKINS/Multiple+SCMs+Plugin||shape="rect"]] installed | ||
12 | {{/note}} | ||
13 | |||
14 | == Installing WebObjects and Project Wonder Frameworks == | ||
15 | |||
16 | Before you can build your framework or application you will need to have WebObjects, [[Project Wonder>>url:https://github.com/wocommunity/wonder/||shape="rect"]] and [[woproject.jar>>url:http://webobjects.mdimension.com/hudson/job/WOLips37Current/lastSuccessfulBuild/artifact/||shape="rect"]] installed on your Jenkins server. The WOJenkins scripts and job configurations depend upon all three of them being installed in the {{code language="none"}}JENKINS_HOME/WOFrameworksRepository{{/code}} directory. | ||
17 | |||
18 | The quickest way to install everything you need is by using WOJenkins itself! Specifically, by using the [[WOJenkins InstallWOAndWOnder>>url:https://github.com/avendasora/WOJenkins_Job_InstallWOAndWOnder||shape="rect"]] job configuration. | ||
19 | |||
20 | 1. Change directories into JENKINS_HOME/jobs | ||
21 | 1. {{code language="bash"}}cd /Users/Shared/Jenkins/Home/jobs/{{/code}}Clone job configuration from github.com repository | ||
22 | 1. {{code language="bash"}}sudo git clone https://github.com/avendasora/WOJenkins_Job_InstallWOAndWOnder.git Install_WebObjects_And_Wonder{{/code}}Set correct ownership and permissions - If you used the Mac OSX Jenkins installer, the user and group that it will be using are both "{{code language="none"}}jenkins{{/code}}" | ||
23 | 1. {{code language="bash"}}sudo chown -R jenkins:jenkins Install_WebObjects_And_Wonder{{/code}}Open Jenkins and tell it to reload the configuration files so it will see the new job. | ||
24 | 1*. From within Jenkins user interface, navigate to: **Jenkins** -> **Manage Jenkins** -> **Reload Configuration from Disk** | ||
25 | 1*. Call the reload URL: [[http:~~/~~/localhost:8080/reload>>url:http://localhost:8080/reload||shape="rect"]] - this link should work for a default install if you haven't turned on any security. | ||
26 | 1. Open the new Job. | ||
27 | You should see a new job called **Install_WebObjects_And_Wonder**. You'll see the following options: | ||
28 | 11. The version of WebObjects to be downloaded from Apple and installed in {{code language="none"}}JENKINS_HOME/WOFrameworksRepository/WebObjects{{/code}} | ||
29 | 11. The branch of Project WOnder that should be built after cloning the Project Wonder github repository. | ||
30 | 11. The build target for wonder that should be run. Usually you'll want the default of just the frameworks. | ||
31 | |||
32 | {{warning title="This job may take a long time to run the first time"}} | ||
33 | Depending upon the speed of your internet connection, this job may take a long time to complete (several minutes to several hours or more) the first time it is run since it downloads the WebObjects installer from Apple, and clones the entire Project Wonder Git repository (including //all// the commit history back to the beginning of time). Subsequent runs should be much faster as the job will not download or install WebObjects again and only new commits will be pulled from the Project Wonder Git repository. | ||
34 | {{/warning}} | ||
35 | |||
36 | ===== Troubleshooting WebObjects & Wonder Install ===== | ||
37 | |||
38 | * If you get the following error: {{code language="bash"}}/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 | ||
39 | Build step 'Execute shell' marked build as failure | ||
40 | Finished: FAILURE{{/code}} 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): | ||
41 | * {{code language="bash"}}${WORKSPACE}/WOJenkins/Install/WebObjects/installWebObjects.sh | ||
42 | ${WORKSPACE}/WOJenkins/Build/Wonder/WorkspaceSetupScripts/Git/setupWonderWorkspace.sh{{/code}}If 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: | ||
43 | *1. Install the plugins under **Jenkins** -> **Manage Jenkins** -> **Manage Plugins**. | ||
44 | *1. Revert the changes made to the config.xml file by Jenkins by calling {{code language="bash"}}git reset --hard HEAD{{/code}} in the job directory | ||
45 | *1. Tell Jenkins to Reload Configuration from Disk as shown above. |