Packaging the customization
In this lesson, you package your customization to prepare it for deployment. You can package and deploy your profit margin-related customization files into your production environment with the HCL Commerce Build and Deployment tool.
About this task
The HCL Commerce Build and Deployment tool is designed to address the error-prone and time-consuming nature of customized asset deployment. The tool provides a starting point for you to automate your build and deployment processes in a standardized, controlled manner. For more information, see Packaging customized code for deployment.
Procedure
-
HCL Commerce EAR package:
The contents of your packaged wcbd_wc assets can resemble the contents of the following sample file.
-
Refer to the following sample extract properties and build properties in the sample package
compressed file:
- build-local-search.properties
- extract-local-search.properties
-
Copy all customized search project to
wcbd_wc\search\workspace
Note: You need to copy all the files under search-config-ext and search-logic-ext into this folder. All the files under these two projects are included.
-
Copy your customized HCL Commerce project into
wcbd_wc\ts\workspace
Copy your customized preprocess configurations under WC\xml\search\dataImport\v3\db2. In example 1, copy wc-dataimport-preprocess-custom.xml and wc-dataimport-preprocess-x-finalbuild.xml into W:\Build_Local_Repository\ts\workspace\ WC\xml\search\dataImport\v3\db2 Copy all the files under WebSphereCommerceServerExtensionsLogic project to include all your customizations.
-
Package your Search customization code:
run wcbd_wc\wcbd>wcbd-ant.bat -buildfile wcbd-build.xml -Dbuild.label=test -Dbuild.type=local -Dapp.type=search
-
Package your Transaction Server customization code:
run wcbd_wc\wcbd>wcbd-ant.bat -buildfile wcbd-build.xml -Dbuild.label=test -Dbuild.type=local -Dapp.type=ts
Results
- wcbd-deploy-server-local-search-search.zip
- wcbd-deploy-server-local-ts.zip
The Search customization code in the examples is built into the package search-logic-ext.jar search-config-ext.jar
- xml
- ejb
- WebSphereCommerceServerExtensionsLogic.jar
What to do next
Using your own CI/CD pipeline to build your customization package into docker image and deploy to your runtime environment.
- Enter the Search container:
- Run docker ps to verify that your containers are running.
- Locate your Search container name in the NAMES column.
- Start a bash shell by running the command
docker exec -it search_container_name bash
.
- Enter the TS (Transaction) container. Your customization appears in the /opt/WebSphere/AppServer/profiles/default/installedApps/localhost/ts.ear directory.