Wiki source code of Configuring jobs in Jenkins

Version 44.1 by Pascal Robert on 2012/01/25 20:16

Show last authors
1 {{info}}
2 Make sure you have the *Git* and *Multiple SCM* plugins in your Jenkins installation before following those instructions
3 {{/info}}
4
5 First, you need to have a WebObjects and Project Wonder installation in Jenkins. David Avendasora is [[providing a sample config>>https://github.com/avendasora/WOJenkins_Job_InstallWOAndWOnder]] file to install and setup Wonder and WebObjects. To install that configuration into Jenkins, do the following:
6
7 * Clone the script somewhere:
8
9 {{code}}
10 git clone https://github.com/avendasora/WOJenkins_Job_InstallWOAndWOnder.git
11 {{/code}}
12
13 * Go into the **WOJenkins//Job//InstallWOAndWOnder** directory that was created with the previous command:
14
15 {{code}}
16 cd WOJenkins_Job_InstallWOAndWOnder
17 {{/code}}
18
19 * Add the config into Jenkins. You can add it by doing a POST request to Jenkins, like this:
20
21 {{code}}
22 curl -v --user youruser:yourpassword -H "Content-Type: text/xml" -s --data "@config.xml" http://yourjenkinsserver:8080/createItem?name=Install_WO
23 {{/code}}
24
25 Replace //youruser// and //yourpassword// with your Jenkins credentials and replace //yourjenkinsserver// with the DNS name (or IP address) of your Jenkins installation.
26
27 * Login into Jenkins. You should see a new job called **Install//WO//**//. This job will install the WebObjects frameworks (either 5.4.3 or 5.3.3), fetch the Wonder code, compile it and install the Wonder frameworks. It will also create a **WOFrameworksRepository** directory into Hudson home (on Linux, it's ///var/lib/jenkins///), that directory is where the WebObjects and Wonder frameworks are installed.//
28
29 * You need to review the Execute Shell Script task in the Build section of the job. When the job was created, the carriage return line gone missing, so add a carriage return just before the second ${{WORKSPACE}}{{/WORKSPACE}}. The task should look like this: 
30
31 {{code language="bash"}}
32 ${WORKSPACE}/WOJenkins/Install/WebObjects/installWebObjects.sh
33 ${WORKSPACE}/WOJenkins/Build/Wonder/WorkspaceSetupScripts/Git/setupWonderWorkspace.sh
34 {{/code}}
35
36 {{info}}
37 Note: If the Git and Multiple SCM plugins were installed when you created the Install_WO job above, the next two steps may not be necessary.
38 {{/info}}
39
40 * We need to configure the **Install//WO//**// job because it's missing the steps to fetch the Wonder code and some scripts from the [[WOJenkins>>https://github.com/avendasora/WOJenkins]] repository. Under the **Source Code Management** section, select **Multiple SCMs**. Add a Git repository with the following details~://
41 ** **Repositories**: git:~/~/github.com/avendasora/WOJenkins.git
42 ** **Branches to build**: master
43 ** **Local subdirectory for repo** (in the Advanced section): WOJenkins
44
45 * We need to add another Git repository, for Wonder, with the following details:
46 ** **Repositories**: $WONDER//REPOSITORY//
47 ** **Branches to build**: $WONDER//GIT//REFERENCE
48 ** **Local subdirectory for repo** (in the Advanced section): Wonder
49
50 * Save the configuration and start a build of **Install//WO//**//. After a couple of minutes, the build should be complete, and in **WOFrameworksRepository**, the frameworks should be there.//