Old dog, new trick: RTC and UrbanCode Deploy

Calling Rational Team Concert an old dog isn’t fair  – it’s only just over 5 years old –  and I mean it in the nicest possible way in the context of the Jazz Jumpstart team being “old”, and the Rational Emerging Technologies Team, well, “emerging”.

Anywho, as is my wont, I was going through what could be in the next CLM release, noticed the bit about Rational Team Concert Build and IBM UrbanCode Deploy and decided to try out this “emerging” feature with Rational Team Concert 4.0.5 RC1.

On the UrbanCode Deploy front I do the following:

1. Create an empty Component JKEComponent with the Source Config Type set to none.


2.  create a Deployment process deployJKEComponent for the JKEComponent that has one  Download Artifacts step (with default settings). 


3. Create an Application JKE and add JKEComponent  to it.


4. Create a process deployJKEApp for the JKE Application that has one Install Component step in it which invokes the deployJKEComponent component process.


5. Create an environment for the JKE Application called DEV.

6. Add a Base Resource  to the DEV environment and add JKEComponent  as a Component Resource to one of the agent resources


That’s it for the UCD setup.

On the RTC front I use the build infrastructure that is created as part of the Money that Matters CLM sample (see  Configuring the Money that Matters sample environment), in particular the brm.continuous build definition.  Using the RTC Eclipse client I edit the configuration of the  brm.continuous build definition and add the  post-build Deploy option.


 The build definition now has a “Post-build Deploy” tab which has 3 configuration sections:

1. Server Information Section


This section collects information on how RTC should connect to the UrbanCode Deploy Server. Note that the instructions in topicCreating encrypted password files can be used to create a password file.

2. Publish Artifacts Section


This section is used to specify how the results of the build are to be published to a UCD component:

Component: I specify the JKEComponent I created in UCD.

Version: I want the name of the component version to be the same as the build label which is in the ${buildLabel} build property.

Base directory:  This is set to the Jazz Source Control load directory relative to the Jazz Build Engine’s current directory and is constructed from a property specified by the Build Definition (${outputRootDirectory}) and the build label.

Include files: I only want a couple of files from the build in the component so I specify those here.

Links: I want to be able to navigate from the component  version back to the RTC Build result so I add a URL here.

3. Process Section

This section specifies the Application process to run and the Environment to deploy into.

processsectionThat covers the setup required. After firing up a build engine , I can request a build and after compiling, running tests etc. the post-build deploy option is invoked. The full build log shows this invocation:

buildlogThe External Links tab of the RTC Build Result also has a link to the UCD component version created.


Following the link shows the details of the Component version with the same name as the RTC build result, the files as specified and a link back to the RTC Build Result.


Checking the DEV environment shows that the build has been successfully deployed.


So this proves to be an easy way to integrate RTC’s build mechanism with UCD. A couple of points to note:

  • If the Deploy check-box in the Process section of the RTC build definition is not  enabled then the files specified will still be published to the UCD component but the Application process will not be invoked.
  • Unlike the post-build Deliver option , there doesn’t seem to be a way to stop the invocation of the post-build deploy if the build fails for some reason. I haven’t dug deeper but maybe the application process should check a “build status” property before executing.

A final point to note:  I carried this out with RTC 4.0.5 RC1 so it is quite possible some/all of this may change by  4.0.5 GA.

14 thoughts on “Old dog, new trick: RTC and UrbanCode Deploy”

  1. Excellent article!
    I have followed the steps using UCD 6.0 and CLM 4.0.5 RC1 and got the post-deploy to work. I have now upgraded to UCD 6.0.1, and now the deploy fails when it tries to publish the version files to UCD. Here is what I see in the build log:

    java.lang.RuntimeException: java.lang.Exception: Request error: 500: No content was specified for hash SHA-256{fd53d8a43c9b17c9118bcf4a487d3893742692c1b1a9f2fb38433218c88cd306} (for file build/jke-C20131203-1148.zip
    java.lang.Exception: Request error: 400: No such transaction

    Any idea what’s caused this in UCD 6.0.1, and how to resolve it?

    1. Hi Sudheer
      I’m getting the same problem after upgrading. I’m going to try it with the RTC 405 GA version and if it still fails will raise a defect.

  2. Hi Freddy,
    I managed to get it working with RTC 4.0.5 GA and UCD I have one issue though, if the Application deployment process fails it doesn’t affect the build result. Is this working as designed ?

  3. I am using rtc4.0.5 with ucd

    i am getting error while deploying the application.

    ManagerURL : http://manoj1:8080/manager/text
    ManagerUsername : ****
    Tomcat context : /jke
    War File : jke.war
    Context XML:
    Caught: java.lang.Exception: War file does not exist!
    java.lang.Exception: War file does not exist!
    at deploy.run(deploy.groovy:43)

  4. When my RTC executes the Post-build Deploy, I get the following error:

    2015-03-16 16:33:42 [Jazz build engine]
    2015-03-16 16:33:42 [Jazz build engine] Substituted the following configuration element property variables:
    2015-03-16 16:33:42 [Jazz build engine] com.ibm.team.build.udeploy : team.udeploy.version = ${buildLabel} –> team.udeploy.version = 20150316-1633
    2015-03-16 16:33:42 [Jazz build engine] com.ibm.team.build.udeploy : team.udeploy.baseDirectory = ${outputRootDirectory}/${buildLabel} –> team.udeploy.baseDirectory = ${outputRootDirectory}/20150316-1633
    2015-03-16 16:33:42 [Jazz build engine] com.ibm.team.build.udeploy : team.udeploy.links = RTC Build Result=${repositoryAddress}resource/itemOid/com.ibm.team.BuildResult/${buildResultUUID} –> team.udeploy.links = RTC Build Result=${buildResultUUID}
    2015-03-16 16:33:42 [Jazz build engine] com.ibm.team.build.udeploy : team.udeploy.links = RTC Build Result=${buildResultUUID} –> team.udeploy.links = RTC Build Result=
    2015-03-16 16:33:42 [Jazz build engine]
    2015-03-16 16:33:42 [Jazz build engine] running on host: udeployoracle
    2015-03-16 16:33:42 [Jazz build engine] Should build occur?
    2015-03-16 16:33:42 [Jazz build engine] Yes: Always build a user initiated request.
    2015-03-16 16:33:42 [Jazz build engine] Invoking pre-build participant “com.ibm.team.build.jazzscm”
    2015-03-16 16:33:43 [Jazz build engine] Accepting changes into workspace “WS_ST_CALLCENTER” …
    2015-03-16 16:33:44 [Jazz build engine] Fetching files to fetch destination “/opt/build” …
    2015-03-16 16:33:50 [Jazz build engine] Invoking build participant “com.ibm.team.build.cmdline”
    2015-03-16 16:33:50 [Jazz build engine] Invoking post-build participant “com.ibm.team.build.udeploy”
    2015-03-16 16:33:50 [Jazz build engine] INFO: Post-build Deploy validate completed successfully.
    java.lang.NoClassDefFoundError: org/apache/http/client/methods/HttpUriRequest
    at com.ibm.team.build.internal.engine.UDeployPostBuildParticipant.createComponentClient(UDeployPostBuildParticipant.java:571)
    at com.ibm.team.build.internal.engine.UDeployPostBuildParticipant.createComponentVersion(UDeployPostBuildParticipant.java:358)
    at com.ibm.team.build.internal.engine.UDeployPostBuildParticipant.publish(UDeployPostBuildParticipant.java:332)
    at com.ibm.team.build.internal.engine.UDeployPostBuildParticipant.postBuild(UDeployPostBuildParticipant.java:205)
    at com.ibm.team.build.internal.engine.BuildLoop.invokePostBuildParticipants(BuildLoop.java:995)
    at com.ibm.team.build.internal.engine.BuildLoop$2.run(BuildLoop.java:752)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.ClassNotFoundException: org.apache.http.client.methods.HttpUriRequest
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    … 7 more

    Any idea ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s