Building packages

Use the HCL Commerce Build tool to build packages for deployment.

Before you begin

  1. Set up source extraction configurations.
  2. Configure packaging settings.
  3. Copy the source code of the customization assets to a local directory (in local mode), or setup a Source Code Management (SCM) repository to properly extract them.
    Project Copy these files
    WebSphereCommerceServerExtensionsLogic Include all the project code from the source directory.
    WebSphereCommerceServerExtensionsData Include all the project code from the source directory.
    Customizable web modules.
    • CommerceAccelerator.war
    Include only the files that were created or modified by you..
    Customization server. Since it is dedicated to customization, extract or copy all of the files in it to the working directory.

Procedure

  1. Change to the WCB_installdir directory.
  2. Build the package.
    • HCL Commerce Developer
      wcbd-ant.bat -Dapp.type=app-type -Dbuild.type=build-type -buildfile wcbd-build.xml -Dbuild.label=build-label
    • Linux
      wcbd-ant -Dapp.type=app-type -Dbuild.type=build-type -buildfile wcbd-build.xml -Dbuild.label=build-label -Dwork.dir=mounted_dir
    Where:
    app.type
    The application that you want to package.
    ts
    Build packages for the Transaction server.
    search
    Build packages for the Search server
    xc
    Build packages for the Customization server
    crs
    Build packages for the Store server
    data
    Build packages for the Data and Schema changes
    build.type
    local
    Retrieve files locally.
    svn
    Retrieve files from an Apache Subversion repository.
    cvs
    Retrieve files from a CVS repository.
    git
    Retrieve files from a Git repository.
    build.label
    An identifier for the package. Use a meaningful build label such the build date or the tag name of the SCM.
    Linux
    work.dir
    (Optional) If you created an external volume mount in Configuring packaging settings, then specify the volume mount.
  3. Check the log file in the following location: WCB_installdir/logs/build-label-tstamp/wcbd-build.log
    Note:

    Ant also provides a way to run an Ant build file with debug information to console. Specify the -d or the -debug flag when calling wcbd-ant.bat or wcbd-ant in the build process. However, such debug information is not written to the log file created by the HCL Commerce Build tool. When you run the HCL Commerce Build tool in debug mode, redirect the standard output and standard error streams to a separate log file.

    For more information about the contents of the package, see Sample HCL Commerce Build tool configuration.

Results

A compressed file is created and saved to the relevant dist directory, following the file and naming convention WCDE_installdir/wcbd/dist/server/wcbd-deploy-server-build-label.zip. Use this package to build a new Docker image to include your custom code. For more information, see Building a custom Docker image from a deployable package.