Resolving variables in a CICS bundle

If your built artifacts contain unresolved variables, use the CICS build toolkit to resolve these variables before you deploy these artifacts to your target environment.

Before you begin

Ensure that you build the targeted projects in a previous run of the CICS build toolkit before you attempt to resolve variables in your built artifacts. For more information about the build process, see Building a CICS bundle, application, application binding, or platform.

About this task

Use this procedure after you build your applications and as part of your deployment phase in a continuous delivery model. Run cicsbt as part of your automated deployment process. Alternatively, run cicsbt at the shell (UNIX or Linux®) or cicsbt.bat at the command prompt (Windows).

Procedure

  1. Specify the --resolve option to indicate the location of the CICS projects you want to resolve.
    Note: The path specified by the --resolve option should match the top-level directory that was specified by the --output option when the project was initially built.
  2. Optional: If you are resolving variables in a stand-alone bundle, specify the --properties option to indicate the location of a stand-alone variables.properties file.

    This step is not required if you are resolving variables in a bundle associated with a platform or application binding. Variables will be resolved using the variables.properties file in the platform or application binding root folder.

  3. Optional: If you specified the --encoding option when building the artifacts, specify the same --encoding value when resolving to ensure that the CICS build toolkit can read the artifacts correctly.
  4. Specify the --output option to indicate the output directory.
    The directory structure of the resolved output will match the directory structure of the input that is supplied by the --resolve option.

Results

Variables in the CICS project are fully resolved and resolved projects are placed in the specified output directory.

Building and resolving in the same script

In most cases, building artifacts and resolving variables will occur at different points in the delivery cycle. For simpler applications, it is possible to build and resolve within the same script.

This example calls the CICS build toolkit to build the latest versions of the CICS bundles, with ID of OSGiBundleProject and AnotherBundleProject, from two different input directories. This call uses the CICS Transaction Server Version 5.1 target to build the referenced Java™ projects. The second call then resolves the variables within the targeted bundles:
cicsbt --input my/source/dir/* other/source/dir/* \
       --build OSGiBundleProject AnotherBundleProject \
       --target com.ibm.cics.explorer.sdk.runtime51.target \
       --output unresolved/output/dir

cicsbt --resolve unresolved/output/dir \
       --output resolved/output/dir
To use this example on Windows, enter all options on the same line as the CICS build toolkit call. If your paths contain spaces, ensure that they are within quotation marks.

What to do next

Proceed to the next step of your deployment process. For example, write a script to move the resolved projects to the CICS platform home directory and deploy the bundle or application resources in CICS by using the DFHDPLOY utility.