I always had
fascination for automated build systems. For me it was always some
magic happening behind those web pages.
Recently I got a
chance to unravel the magic by doing a Jenkins install. To be honest
it was really really simple; easier than configuring tomcat. Below steps are just high level view to let you know how simple it is, for proper steps please refer the Jenkins site
High level steps:
- Download Jenkins WAR
- Run with Java (Java -jar jenkins.war). Jenkins war comes with inbuilt jetty, so no need to have a separate container
- Configure few properties in the Jenkins web page like JAVA_HOME, ANT you want to use.
- Configure the Job (Project)
- Specify the source control tool: For us it was perforce, with a very easy to use Jenkins Perforce plug-in the config was simple. Just create a separate perforce work-space that Jenkins will use to sync the code, provide user id etc.
- Specify the build file (for us ANT), targets etc.
- Specify the polling interval.
That’s it.
Fired some build
manually to check if everything was working fine.
Next morning the
build ran as per the schedule, it even synced the code taking latest change
lists.
Still looks like
magic ... :)
Pitfalls:
- Initially whole build was OK, but the Dojo part was failing with errors giving hint that there is some path issue. After losing one day, realized that dojo build fails if the path contains a “.”. Jenkins by default creates a home directory by name “.Jenkins” in the user directory and all project, job etc are synced there only. So to avoid any such issue, before you start Jenkins for the first time: Create a system variable by the name of “JENKINS_HOME”, and give a path of your choice.
- First time also faced some issue where build was not able to create / update some files. Had to manually set the source folders/files writeable.
No comments:
Post a Comment