Support

submit a bug report if you need technical support or have questions.

Documentation

Visit the Wiki extensive and up to date documentation at your fingertips.

Contact Me

Missing images/links, any comments, suggestions, need help? Contact me

Automatic installation of Joomla! runtime environments

Main ideas

Build is scalable

Distributed build management optimize hardware resources utilization by parallelizing product builds within the build agents grid. With build chains support, it is even possible to break down a single build procedure into several parts to run them on different build agents &8212; both in sequence and in parallel &8212; using the same set of sources in all of them.

I want to be able to test my components against many versions of Joomla!

All versions of Joomla! are in subversion as zip files in an own SVN repository

For example:

  • ${JOOMLA15_VCS_ROOT}&160; is svn:\\localhost\joomla1.5\trunk
  • ${JOOMLA10_VCS_ROOT}&160; is svn:\\localhost\joomla1.0\trunk

These repository ${JOOMLAxx_VCS_ROOT} are connected to all build as supplementary VCS root in TeamCity and thus content get checked out as part of the build in the build temporary directory of one agent. ($AGENT_BUILD_DIR)

joomla1.5\trunk
&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160; Joomla_1.5.4-Stable-Full_Package.zip
&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160; Joomla_1.5.5-Stable-Full_Package.zip
&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160; Joomla_1.5.6-Stable-Full_Package.zip
&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160; Joomla_1.5.7-Stable-Full_Package.zip
&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160; Joomla_1.5.8-Stable-Full_Package.zip

So after the checkout, the file system will look like

($AGENT_BUILD_DIR)\&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;

&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160; Joomla_1.5.4-Stable-Full_Package.zip
&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160; Joomla_1.5.5-Stable-Full_Package.zip
&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160; Joomla_1.5.6-Stable-Full_Package.zip
&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160; Joomla_1.5.7-Stable-Full_Package.zip
&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160; Joomla_1.5.8-Stable-Full_Package.zip

If you don't want to provide support a a specific version of Joomla! just remove it from the trunk! or add new ones on purpose. That's easy.

Ant tasks/Maven MOJO

  • Are responsible for unpacking all these zip files to the build temporary agent directory. ($AGENT_BUILD_DIR).
  • Filenames are found with a configurable regular expression,
  • All settings will be committed in \joomla1.5\trunk\build.deploy.properties

Another ant script/task will for each zip,

  • Start a Selenium test cases that will create a virtual user that use the regular Joomla! installer and drive installation till the end.
  • All settings which have to be Joomla! and build independent will be randomly generated, preferably UUID for password and database name for example.
  • Login and Admin password may be the same (admin:admin) at the beginning but can also be generated and written to a file on disk in ($BUILD_DIR)/{joomlarootversion}/build.install.properties.
  • Directory installation ($BUILD_DIR)/{joomlarootversion}/installation will be renamed to ($BUILD_DIR)/{joomlarootversion}/installation.old or simply deleted
  • Selenium/PHP Unit test that are committed in \joomla1.5\trunk\Installation.Checks will perform basic checks (login, logout, navigate) to ensure that installation of Joomla! has been successful.
    If everything succeed, we will have a set of Joomla! versions ready for our components regression testing.

Remarks:

  • No build temporary directory. ($AGENT_BUILD_DIR) will be deleted by Ant or Maven but by the build server itself. This will let developer look at the issues on file system and in database.
  • New scripts may be developed to extract from the build server or Joomla! farm easily the non running Joomla! instance files + database) so developers can install the broken setup locally.

Automatic deployment of Joomla! components

Your component is typically shared and many developer committed regularly in a different VCS root... For SecurityImages 5.x.y, subversion root may be&160; svn:\\localhost\securityimages5\trunk

This VCS root is also attached to the build and get check out at build time by TeamCity.

Packaging

if a build.xml is present in {VCS_ROOT}\build.xml then it is executed prior to any further operations, purpose of build.xml is to produce a component binary distribution (zip or tar.gz) that can be then installed to ALL Joomla install in the agent root directory.

Deployment

if a deploy.xml is present in {VCS_ROOT}\deploy.xml then it is executed, purpose of deploy.xml is to deploy one or many component binary distribution (zip or tar.gz) to ALL Joomla install in the agent root directory.

Why one or many component?

I want to be able to track also component dependencies issues.

Lets say that SecurityImages does not play well with VirtueMart, I may want to test also that combination across Joomla! instances, that's why VirtueMart may have to be deployed with SecurityImages or not.

prerequisites:

  • Running SVN server, see HERE for installing it on windows
  • Installed JVM, latest JDK 1.6u10
  • Running TeamCity server
  • Running XAMPP with HTTP root directory at TeamCity agent root directory.
  • Apache ANT with additional library for more control (if, case, for loop)

This articles will be available in my WIKI soon http://wiki.waltercedric.com/index.php?title=ContinuousBuildforJoomla so any reader or developer can participate to the discussion, next step is to implement the above and that will e documented as well :-)

comments powered by Disqus

You might like also

Failed opening required PHPUnit/TextUI/TestRunner.php in Maven For PHP
This issue has turn me upside down a long time. In fact in the official Google Group http://groups.google.de/group/maven-for-php/ I was not the only one to have this issue. I did try the following, and it is always good to check first Checking PHP version, Starting Maven with -X for having more debug information Testing it in Eclipse + M2Eclipse on windows, was working there, Comparing calculated PHP include path on Windows and Linux: they were identical in this case Only …
3333 Days ago
Installing Subversion on OpenSuse and Plesk 9
Subversion (SVN) is an open source version control system. It allows users to keep track of changes made over time to any type of electronic data. Typical uses are versioning source code, web pages or design documents. I now host my own private subversion at http://svn.waltercedric.com A required step to be able to build some small project and finish the prototype of Continuous build for Joomla!   …
3610 Days ago
When Joomla! meet Maven for PHP
I will quickly describe in this post how you can code your component/plugins/modules against a specific version of Joomla! with no effort using Maven for PHP. The trick I made is to package the whole Joomla distribution in a jar file, and add a Maven dependency to the project. As Joomla, PHPUnit, or any other 3rd party is not a set of class packaged in a jar, the brilliant idea of Maven for PHP is to unpack all these dependencies …
3624 Days ago
My 2 first Joomla! component in continuous build
Status/Done Build with Maven For PHP in TeamCity SVN repository at http://joomlacode.org/svn/com_securityi1/trunk/ and http://joomlacode.org/svn/com_akobookplus/trunk/ Totally independent of continuous build server (Thanks to MAVEN), so Hudson, Bamboo and Cruise Control are SUPPORTED. …
3625 Days ago
Configuring TeamCity, Maven for PHP for Joomla continuous build
Maven for PHP uses the power of Maven for building, reporting on and creating documentations of PHP projects. It adapts the Maven build lifecycle to the PHP world while fully supporting PHP 4 and PHP 5. PHP for Maven uses PHPUnit for unit testing and doxygen for creating the api documentation. Use a PHP library project to create a library that can be used by other PHP libraries or PHP web projects. Use a PHP web project to create a …
3626 Days ago
No Thumbnail was found
I put some effort the last few days in this new framework. Done: I did document some part of it at http://wiki.waltercedric.com/index.php?title=ContinuousBuildforJoomla TeamCity is installed/configured/documented (windows only) XAMPP is installed/configured/documented (windows only) I also at the same time configured a Puppy Linux VMWare image that will permit to anybody to have a running environment in no time. I am able to unpack all Joomla! versions that are committed in any repository (CVS, SVN, Clearcase) They can be unpacked anywhere on …
3712 Days ago
Installing PHPUnit / Selenium in XAMPP
&160; &160; A small how to install PHPUnit via PEAR in an XAMPP running on a windows box. A prerequisite for a continuous build strategy. PHPUnit is a member of the xUnit family of testing frameworks and provides both a framework that makes the writing of tests easy as well as the functionality to easily run the tests and analyze their results. PHPUnit homepage ONLamp.com - Testing PHP Code with PHPUnit Planet PHPUnit Sebastian Bergmann (creator of PHPUnit) Installing XAMPP …
3737 Days ago
ContinuousBuild4Joomla project submitted to JoomlaCode.org
I will commit soon a first draft (alpha) of what is expected to bring continuous build to any Joomla! component (or event to Joomla! core itself ;-)) You are free to join the project, all documentation effort stay at the moment in my WIKI &160; …
3759 Days ago