Jazz Library Guide to Integrating Rational Build Forge with IBM UrbanCode uDeploy
Author name

Guide to Integrating Rational Build Forge with IBM UrbanCode uDeploy

As a development team, there are times when we need to automate the build and deployment of application code and the related deployable elements. In this scenario, Build Forge and uDeploy can help you to do the automation work:

Scenario of Integration

This article provides a step-by-step example of how to set up a continuous delivery environment with Rational Build Forge and UrbanCode uDeploy.

Build Forge provides 2 adapters to make it simple to integrate with uDeploy, and they can be used separatly for different purpose:

  1. uDeployPublisher Adapter: used to pubish the builded artifacts to uDeploy Code Station for deploy.
  2. uDeployDownloader Adapter: used to download needed artifacts from uDeploy Code Station.

Prerequisites

To follow this article, you must have installed Build Forge and uDeploy.

For installation instructions, see the Build Forge and uDeploy information center links in the Reference section.


Part I, Publish Artifacts

Overview

overview of          publish

As shown in the above picture, the scenario of the integration is very clear, Build Forge will do the build work, then publish the build artifacts to the uDeploy for deployment.

The design of the integration is simple, as uDeploy has provided the uDeploy Client for the third parties to do the integration with uDeploy. Build Forge will leverage this component. The whole integration process will be:

  1. Build Forge provides an uDeploy XML adapter to send uDeploy commands to uDeploy Client to do the publish work.
  2. After promotion to automated deployment tool is finished, Build Forge fetches the log and adds the published artifacts to Build Forge BOM.

User can change the environment variables in Build Forge to use the XML Adaptor.

Environment variable Intro
UCLIENT_PATH The uClient install path in the os, will be the [BF install path]/jas_utilities/jars
UDEPLOY_SITE_URL The uDeploy url
UDEPLOY_SITE_USERNAME The uDeploy username
UDEPLOY_SITE_PASSWORD The uDeploy password
BUILD_COMPONENT The component name
BUILD_VERSION The component build version name
BUILD_PATH The component build path

Usage Example

uDeploy Side

  1. Login to uDeploy and create a component named helloworld.

Build Forge Side

  1. Make sure you have set JAVA_HOME.
  2. Create a adapter with the uDeployArtifactsPublisher template.
  3. Create a project named uDeploy with two steps. The first step is to do the build; the second step is to use .source command to invoke the XML Adaper you just created. The command of the step should be “.source uDeployPublisher”.
  4. Modify the environments of the project base on your situation. Make sure to set the UCLIENT_PATH to [BF install path]/jas_utilities/jars

Run the Example

  1. Run the uDeploy project, you will find it runs successfully.
  2. Check the BOM list, you will see the published artifacts shown in BOM.
  3. Log in to uDeploy and check the code station, you will see the build artifacts have been uploaded to the code station successfully.

Part II, Download Artifacts

Overview

overview of          download

As shown in above picture, Build Forge can also download artifacts from uDeploy Code Station if needed.

The design of the integration is simple, as uDeploy has provided the uDeploy Client for the third parties to do the integration with uDeploy. Build Forge will leverage this component. Besides that, Build Forge also need uDeploy Enhanced Client to be able to download artifacts.

Build Forge provides an uDeploy artifacts download xml adapter, it sends two uDeploy commands to uDeploy through uDeploy Client and uDeploy Enhanced Client. The first commands is used to get the artifacts resource location in uDeploy Code Station, if it is successful, the second command will download them.

User can change the environment variables in Build Forge to use the XML Adapter.

Environment variable Intro
UCLIENT_PATH The uClient install path in the os, will be the [BF install path]/jas_utilities/jars
UDEPLOY_SITE_URL The uDeploy url
UDEPLOY_SITE_USERNAME The uDeploy username
UDEPLOY_SITE_PASSWORD The uDeploy password
BUILD_COMPONENT The component name
BUILD_VERSION The component build version name
BUILD_PATH The component build path
SET_FILE_EXECUTE_BITS False by default
SET_VERIFY_FILE_INTEGRITY True by default
BUILD_LABEL The version name which you want to download artifacts from

Usage Example

uDeploy Side

  1. Login to uDeploy and create a component named helloworld.
  2. Create a version for the component and upload some files for the version.

Build Forge Side

  1. Make sure you have set JAVA_HOME.
  2. Create a adapter with the uDeployArtifactsDownloader template.
  3. Create a project named uDeploy with one step. the step is to use .source command to invoke the XML Adaper you just created.The command of the step should be “.source uDeployDownloader”.
  4. Modify the environments of the project base on your situation. Make sure to set the UCLIENT_PATH to [BF install path]/jas_utilities/jars

Run the Example

  1. Run the uDeploy project, you will find it runs successfully.
  2. Check the BOM list, you will see the downloaded artifacts shown in BOM.
  3. Open the target directory, you will see the downloaded artifacts in the directory.

Reference


About the author

Forest Huo is a developer of IBM Build Forge Team. He works for IBM in China Development Lab. Beijing. He can be contacted at huozz@cn.ibm.com.

Thu, 22 Aug 2013