Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Using Jenkins as Continuous Build Software

Table of Contents
excludeIn this chapter

 

This is a quote from http://jenkins-ci.org/content/about-jenkins-ci:

"In a nutshell Jenkins CI is the leading open-source continuous integration server. Built with Java, it provides 800 plugins to support building and testing virtually any project."

Stoc

Overview

Jenkins is a free open-source continuous build software package. It is managed by the Jenkins CI community. It is well suited for Java based projects, and some of the more notable features include:

  • Plugins for many popular builders such as Ant, Maven, ...; source control such as CVS, SVN, Git, Mercurial, ...; integration with GitHub through various plugins; notification via email and and other means; authentication via default container authentication/OpenID/Custom users/...
  • Other 3rd part extensions for lots of other nice features.
  • Multiple jobs can be made to run at the same time, even on multiple master/slave Jenkins nodes and, using some plugins this can be configured around a number of available external "resources".
  • Groovy scripts can be run directly from the web interface against a Jenkins API.
  • Open source so extensible and customizable.
  • Web application - the entire build/job configuration can be done via a web browser.

Installing Jenkins

Download and install Jenkins native package from http://jenkins-ci.org/. Jenkins can also be deployed as a .war file in containers such as Tomcat, but the configuration would be identical.

...

You should now be able to access Jenkins at http://localhost:8080. This tutorial is based on a native Windows service installation, but it should be similar on other OSes as well.

Configuration Tips

As Jenkins and Servoy are both Java driven applications, they share some Java technologies, and by default, share port configurations as well. If you plan to run Jenkins and Servoy Application Server on the same machine, port changes will need to be made one application or the other in order for the applications to work properly.

...

  • if you don't have Ant installed, in "Ant" section add a new installation, give it a name and check "Install automatically".
  • download and unzip ant-contrib (for example I downloaded and unzipped ant-contrib-0.6-bin.zip) from http://sourceforge.net/projects/ant-contrib/files/ (project page is http://ant-contrib.sourceforge.net/). Check "Environment variables" in Jenkins configuration page and set a key-value pair with key "ANT_CONTRIB_JAR" (drop the quotation marks) and value containing the full path to where the downloaded ant-contrib*.jar is located in the unzipped contents - including file name.
  • "# of executors": set it to 1 for now; this limits the concurrent executing jobs to 1. In the future if you want to set-up a more advanced configuration you can configure multiple jobs to run simultaneously (for example for multiple solutions) - just make sure they use separate resources so that they don't affect each other (for example separate Servoy Installations).
  • "Jenkins URL": to the real URL that will be used by users to access the Jenkins server. (for example this will appear as part of notification emails)
  • "System Admin e-mail address": use your email address.
  • "E-mail Notification": configure this as needed. By default it will try to use the localhost SMTP server which will already be working probably on some linux machines. You can also test the configuration by sending a test email.
  • hit the "Save" button.

Step-by-step configuration for using it with Servoy

In the SVN repository we will have Servoy solutions that need to be automatically tested using import-smart-client and a solution to be automatically tested in mobile-test-client. The ANT scripts used by Jenkins to automatically export and test Servoy solutions will be in a separate project "antRunner" in the same SVN repository.

...

After a build finishes you should have 4 files in your build/Status/Build Artifacts - one showing the test results and 3 Servoy log files showing what happened while exporting/testing.

Customize Jenkins jobs to suite your set of test solutions

Congratulations! Now you should have a working sample Mobile Client test job and a working sample Smart Client test job.

...