Quo Vadis Continous Integration

Continous Integration is one the current buzzwords in the software development area. Everyone who’s familiar with open source and/or JAVA knows Jenkins as one way to built up a CI environment. Jenkins is a nice tool for Continous Integration and could be also used for Continous Delivery. For example you can use a job to deploy new version on a QS or prep system to prepare a new release. The Promotion Build Plugin in combination with the Build Pipeline Plugin (BMP) is really helpful here. For more details about BMP check out my presentation. Splitting big build jobs into smaller jobs can give you the benefit to find errors faster:

But anyone who uses Jenkins with various projects knows, that the management of the Jobs isn’t that easy. There’s no default versioning of the Jobs. So you end up with copying your jobs or similiar thinks. A nice approach is the Job DSL Plugin: The whole configuration of a Job is done within a DSL, which can be checked into your version control. This makes it easier to reuse your job configuration in different environments. It also makes the handling of Build Pipelines or branches easier.

But there’s another Tool which is mainly used in the OSS world for Continous Intgration: Travis CI is a cloud-based solution which used virtual machine images for each build. There a Pro-Version which allows the usage of private repositories. The basic idea behind travis is that you desribe within a setup file which environment you need and always set up a fresh environment for your build job. These eliminate some typical errors within Jenkins, where you redeploy each time and didn’t have the user rights to install software.

The setup is desribed with Ruby, see my owncloud example file .travis.yml:

language: php
- 5.4
- 5.3
# optionally specify a list of environments, for example to test different RDBMS
- DB=mysql
- DB=sqllite

- sudo apt-get update -qq
- sudo apt-get install -qq apache2
- sudo apt-get install php5
- sudo apt-get install libapache2-mod-php5
- sudo /etc/init.d/apache2 restart

- ./bin/ci/prepare.sh
- sh -c "if [ '$DB' = 'mysql' ]; then ./bin/ci/prepare_mysql.sh; fi"
- sh -c "if [ '$DB' = 'sqllite' ]; then ./bin/ci/prepare_sqllite.sh; fi"
- phpunit --configuration phpunit_$DB.xml --coverage-text
- ./bin/sausage/vendor/bin/phpunit --path=./apps/roundcube/tests/integration/Selenium.php

Travis integrates completly with GitHub, check out the complete example.

Travis CI won’t fit for typical commercial products, but has some nice ideas and maybe there will be a version which companies can deploy within there own environment

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.