Support

Forums

Contact Me

Posts Tagged 'teamcity'

TeamCity

TeamCity is a Java-based build management and continuous integration server from JetBrains. [http://en.wikipedia.org/wiki/TeamCity]

When Joomla! meet Maven for PHP

apache_maven

joomla logo vert color

  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 in the target/phpinc directory automatically AND concatenating this directory to the php setting include_path during compile and test phase. You can do the same using the command line by running:

php -d include_path=

That’s also why, It is very important to not put anything from this directory under version control (add a cvs.ignore or svn properties svn:ignore) as it contains dependencies that have no reason to be put under version control in Maven paradigm (they have to reside in a Maven repository)

So I create a new zip file joomla-1.5.10.jar with a directory inside named ‘Joomla’ that contains a standard binary distribution…this jar is published in artifactory with a groupid org.joomla (arbitrary chosen by me)

Read more: When Joomla! meet Maven for PHP

TeamCity 4.5 up and running

teamcity512

Today JetBrains announces the public availability of TeamCity 4.5, it's award-winning distributed build management and continuous integration tool.
With TeamCity, you can set up a build server for your projects within minutes and enjoy out of the box continuous unit testing, code quality analysis, and early reporting on build problems - even without leaving your favorite IDE.
TeamCity offers a gentle learning curve, so you can quickly improve your release management practices by gradually adopting its advanced features and capabilities.

I did upgrade my version of TeamCity at teamcity.waltercedric.com to the latest version, aka 4.5

Read more: TeamCity 4.5 up and running

Installing TeamCity standalone on OpenSuse 11.x/ Plesk 9

teamcity512

After fighting many days.. with their container versions (many webapps in the same tomcat with mod_proxy, mod_proxy_ajp), I did install JetBrains TeamCity, Atlassian Jira and Bamboo as standalone on my server.

TeamCity is a Java-based build management and continuous integration server from JetBrains, creators of IntelliJ IDEA and ReSharper.

 

What will happen next?

Read more: Installing TeamCity standalone on OpenSuse 11.x/ Plesk 9

Apache Maven manifest and enabling agile testing

apache_maven

In this small post i will present you how to

  1. Track and identify across your Apache Maven multi project builds all components, their versions, and class path if needed
  2. Get valuable information from your testing team, and add it to the GUI of your web applications

To solve the problem number 1, we will use Manifest files

On the Java platform, a manifest file is a specific file contained within a JAR archive. It is used to define extension and package related data. It is a metadata file that contains name-value pairs organized in different sections. If a JAR file is intended to be used as an executable file, the manifest file specifies the main class of the application. The manifest file is named MANIFEST.MF. [Wikipedia]

If you do nothing special in Maven., you will see across your jar files the following in all META-INF/MANIFEST.MF

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven

 

The solution I propose here will write all these META-INF/MANIFEST.MF the following  content:

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: agent1
Build-Jdk: 1.6.0_20
Specification-Title: Unnamed - com.waltercedric:web:war:1.0.0-SNAPSHOT
Specification-Version: 1.0.0-SNAPSHOT
Specification-Vendor: waltercedric
Implementation-Title: Unnamed - com.waltercedric:web:war:1.0.0-SNAPSHOT
Implementation-Version: 1.0.0-SNAPSHOT
Implementation-Vendor-Id: com.waltercedric
Implementation-Vendor: waltercedric
buildDate: 2010.09.22-14:12
svnrevision: 18625
Class-Path: spring-ws-core-1.5.6.jar spring-aop-2.5.6.jar spring-
 web-2.5.6.jar spring-webmvc-2.5.6.jar spring-context-support-2.5.6.jar
.. .. ..

 

Read more: Apache Maven manifest and enabling agile testing

Module Jetbrains Teamcity for Joomla!

Teamcity is a distributed build management and Continuous Integration system that allows your team to run and monitor your software building process while improving team communication, productivity and the integration of changes.

This extension displays the status of your TeamCity continuous integration builds. TeamCity REST API is extremely rich, and I did made some choice concerning the ouput. Feel free to provide and send me ideas how I can improve the layout or by adding new functionalities!

teamcity.module.for.joomla.frontend.01 teamcity.module.for.joomla.frontend

The right picture also show how build status is represented with different colors (can be changed in CSS file):

  • green: last build was successful
  • red: last build failed
  • orange: last build has warning
  • gray: never build yet!
  • yellow: notice

Features

  • Native Joomla! 1.5 module,
  • CSS driven output (media/mod_teamcity/css/teamcity.css)
  • Code produced is XHTML 1.0 Strict,
  • Full module caching for better performances
  • Tested in the following browser Firefox, Opera, Chrome, IE 8
  • Approved at Joomla Extension JED, NOT YET BUT PENDING
  • GPL v3.0,
  • Non commercial.

Limitations

  1. Only tested with Teamcity 5

Download mod_teamcity_1.0.0.zip

Wiki

Articles tagged

TeamCity updated to 5.1.1 and a Joomla! module soon available :-)

I did upgrade from TeamCity 5.0.1 to TeamCity 5.1.1 In no time, just drop the war in my Tomcat container :-)

At this address you will always find the latest snaphosts of some (I would need 44 builds to display them all!) of my PHP projects for Joomla!

http://teamcity.waltercedric.com

I will also upgrade tomorrow early morning our TeamCity Licensed server at www.Innoveo.com .

Continuous build for Joomla!

By the way I have still to deliver (HERE and HERE) what i promised on the Joomla! development group, aka a full solution for developing Joomla! using Maven for PHP and Teamcity/Bamboo/Husdon. You can see the documentation I made in my WIKI (work in progress)

TeamCity integration in Joomla!

At the same time, Joomla! users that are using TeamCity, search no more, I will be providing you the first GPL module for Joomla! that let you display in your site the status of all your builds/projects! The code is heavily using the REST API with PHP CURL and a bit of XML parsing. If you have any requirements, it is still time to drop me an email ;-)

Maven dependencies graph plugin in TeamCity and Eclipse

apache_maven

How to add dependencies graph to multi module projects. With this Maven plugin, you’ll be able to visualize Maven modules interdependencies and dependencies in any scope (compile, text, provided, system, runtime)

depgraph:depgraph Can be used to draw a dependency graph from the project, the mojo is executed in. It traverses all dependencies and creates a graph using Graphviz. It draws a dependency graph just for your project. For a simple POM with no sub modules, it draws a graph of all dependencies (including transitive ones) below it. For a POM with sub modules, goes into each leaf POM and generates a separate graph for it.

 

Here is an example of output on the plugin itself

depgraph

Read more: Maven dependencies graph plugin in TeamCity and Eclipse

Development shift in the way I deliver my latest Joomla! extensions

agile.development

 

Starting from now on, I will deliver all my latest (unstable) extensions versions through  my continuous build server. All request or bugs discovery that are requested in my forums and solved will lead to a new build that you will be able to download a lot faster than before.

Thanks to Maven for PHP, I can now commit, 60 seconds later, unit test run and  the result is a direct download for my extensions snapshots.

 

 

 

 

 

 

Here is an example with the module mod_related_thumb_items

Head to http://teamcity.waltercedric.com/teamcity/guestLogin.html?guest=1

Locate the module or component you are interested in:

HowTODownloadLatest

Click on the latest build, must be  Success

HowTODownloadLatest.01  

If this build is a direct answer to a support request in my forums, or solve an issue, You should be able to see in changes the commit description, and even which file have been changed after and before the commit.

http://teamcity.waltercedric.com/teamcity/viewLog.html?buildId=217&buildTypeId=bt3&tab=buildChangesDiv

HowTODownloadLatest.05

But Hey! you want to download this latest build now, go to artifact

HowTODownloadLatest.02

Staying  on the edge by using RSS

You can monitor any build by using the RSS icon in your browser toolbar, or example with this module, it would be

http://teamcity.waltercedric.com/guestAuth/feed.html?buildTypeId=bt20&itemsType=builds&userKey=guest

This way of downloading the latest extensions do not replace the page http://www.waltercedric.com/joomla-releases-mainmenu-269.html where there is there only stable versions.

The next step is to make the maven phase “site” work (I have issue with phpdocumentor not found), this will create automatically a internet site in one of my sub-domains ad hide this complexity.

TeamCity remote debug your Maven build

apache_maven

How to remote debug test cases

Change the Team city project configuration by adding a -Dmaven.surefire.debug to Maven runner in Additional "Maven command line parameters"

maven.remote.debug.testcases

Now when test cases will be executed by maven surefire plugin, the build will wait for a remote debugging application to pick it up on port 5005 and this for EVERY MODULES
meaning:  If you have 5 Maven modules (= java projects) with test cases maven surefire will request 5 times you to connect with remote debugging to your build server.

Create a Remote Java Application launcher you'll also share in one eclipse project:

maven.remote.debug.launcher

 

Don't forget to remove the -D variable or your daily build may wait for a remote debug connection! or create a special build configuration of your project targeted for debugging purpose.

Remote debugging Maven plugin

put into "JVM command line parameters:" these settings:

-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5006

debug.maven.in.teamcity

Create a Remote Java Application launcher you'll also share in one eclipse project that will connect to the port 5006.

Donations

Thank You for supporting my work