HCL Commerce Version 9.0.1.1 or later

Deploying schema and data changes with WCBD 

You can use WCBD to deploy schema and data changes in sql, xml, dataload, acug, acp, and acpnls files.

About this task

Note that WCBD deploys changes in a specific order:
  1. SQL files
  2. XML files
  3. Dataload files
  4. ACUG files
  5. ACP files
  6. ACPNLS files

Procedure

  1. Create a Data Load project that includes the data files you want to deploy. You have two options:
    1. Build a data package with the HCL Commerce Build Tool. Then, extract it to the wcbd/source/ directory. For more information about using WCB to build data package, see Packaging customized code for deployment.
    2. HCL Commerce DeveloperCopy your Data Load project to WCInstallDir/wcbd/source directly. For more information about organizing a Data Load project, see HCL Commerce Build tool repository structure.
  2. HCL Commerce Developer Set ANT_HOME and WAS_HOME environment variables. You need to set these environment variables only if you are using HCL Commerce Developer.
    1. Copy WCB_installdir/wcbd-setenv.bat.template to WCB_installdir/setenv.bat.
    2. Open WCB_installdir/setenv.bat with a text editor and set the following values:
      • ANT_HOME to the Ant_installdir
      • WAS_HOME to the WAS_installdir
      • WC_HOME to the WC_installdir
      Note: The setenv script in the Utility server Docker container is already set to match the runtime environment. Change the setenv script only if you need to apply customizations.
  3. Ensure that the correct JDBC driver path is added. Its value must be CLASSPATH in setenv.bat (for the developer environment), or setenv (for the server environment).
  4. Set security-sensitive build configurations.
    1. Copy WCB_installdir/wcbd-deploy.private.properties.template to WCB_installdir/deploy-targetenv.private.properties. The variable targetenv contains the values for use with target.env when you deploy the data with wcbd-ant.bat target.env. This parameter specifies the target environment that you want to deploy the data to. For example, qa, dev, prod
    2. Configure the following properties in WCB_installdir/deploy-targetenv.private.properties: db.user.name and db.user.password
  5. Set the deployment configurations for use in the deploying process.
    1. Copy WCB_installdir/wcbd-deploy.properties.template to WCB_installdir/deploy-<targetenv>.properties.
    2. Configure the following properties in this file:
      db.name, db.host.name, db.server.port, db.schema.name, db.type, jdbc.url, jdbc.driver.path, jdbc.driver wc.home, was.home
  6. Run wcbd-ant to start the deploying process.
    1. HCL Commerce Developer wcbd-ant.bat -buildfile wcbd-deploy.xml -Dtarget.env=target-env -Dbuild.label=build.label
    2. ./wcbd-ant -buildfile wcbd-deploy.xml -Dtarget.env=target-env -Dbuild.label=build.label