Configuring jobs in Jenkins
Version 44.1 by Pascal Robert on 2012/01/25 20:16
First, you need to have a WebObjects and Project Wonder installation in Jenkins. David Avendasora is providing a sample config file to install and setup Wonder and WebObjects. To install that configuration into Jenkins, do the following:
- Clone the script somewhere:
git clone https://github.com/avendasora/WOJenkins_Job_InstallWOAndWOnder.git
- Go into the WOJenkinsJobInstallWOAndWOnder directory that was created with the previous command:
cd WOJenkins_Job_InstallWOAndWOnder
- Add the config into Jenkins. You can add it by doing a POST request to Jenkins, like this:
curl -v --user youruser:yourpassword -H "Content-Type: text/xml" -s --data "@config.xml" http://yourjenkinsserver:8080/createItem?name=Install_WO
Replace youruser and yourpassword with your Jenkins credentials and replace yourjenkinsserver with the DNS name (or IP address) of your Jenkins installation.
- Login into Jenkins. You should see a new job called InstallWO. 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.
- 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 $Unknown macro: WORKSPACE. Click on this message for details.
. The task should look like this:
${WORKSPACE}/WOJenkins/Install/WebObjects/installWebObjects.sh
${WORKSPACE}/WOJenkins/Build/Wonder/WorkspaceSetupScripts/Git/setupWonderWorkspace.sh
${WORKSPACE}/WOJenkins/Build/Wonder/WorkspaceSetupScripts/Git/setupWonderWorkspace.sh
- We need to configure the InstallWO job because it's missing the steps to fetch the Wonder code and some scripts from the WOJenkins repository. Under the Source Code Management section, select Multiple SCMs. Add a Git repository with the following details:
- Repositories: git://github.com/avendasora/WOJenkins.git
- Branches to build: master
- Local subdirectory for repo (in the Advanced section): WOJenkins
- We need to add another Git repository, for Wonder, with the following details:
- Repositories: $WONDERREPOSITORY
- Branches to build: $WONDERGITREFERENCE
- Local subdirectory for repo (in the Advanced section): Wonder
- Save the configuration and start a build of InstallWO. After a couple of minutes, the build should be complete, and in WOFrameworksRepository, the frameworks should be there.