Deleting customizations
You can delete customizations that you previously deployed.
Deleting customizations from existing applications
Existing applications include the IBM default modules such as
buc-app-order
or
buc-app-inventory
. If you want to delete customizations that you made to existing
applications, then complete the following steps.- If you are using a CI/CD pipeline to deploy changes, complete the following steps.
- Open the <module-name>/package.json file.
- Modify the package-customization
script:
"package-customization": "mkdir -p dist/<module-name> && touch dist/<module-name>/.deletemodule"
- Go to the module's root folder
devtoolkit_docker/orderhub-code/<module-name> and run the
following command to build the package for
deployment.
yarn package-customization
-
Run the following command to publish the changes. This command assumes that the
features.json
file exists in the module's root directory.yarn orderhub-cli publish-customization --client-id=<clientId> --client-secret=<clientSecret> --package-name=<module-name>
- If you want to delete the customizations manually, complete the following steps.
- Create a dist/<module-name> directory in the <module-name> folder.
- Add .deletemodule file under
dist/<module-name>
. For example,devtoolkit_docker/orderhub-code/<module-name>/dist/<module-name>/.deletemodule
- Run the following command to publish the changes. This command assumes that the
features.json
file exists in the module's root directory.yarn orderhub-cli publish-customization --client-id=<clientId> --client-secret=<clientSecret> --package-name=<module-name>
Deleting custom applications
Custom applications are applications that you created with IBM-provided scripts. For more
information, see Creating new applications. If you want to delete custom applications,
then complete the following steps.
- If you are using a CI/CD pipeline to deploy changes, complete the following steps.
- Open the <module-name>/package.json file and add the
following
line.
Where <module-name> is the name of the module, for example custom-app."package-customization": "mkdir -p dist/<module-name> && touch dist/<module-name>/.deletemodule"
- Open the <module-name>/features.json file and set the
state value to MARK_FOR_DELETE.For example,
"state": "MARK_FOR_DELETE",
- In a terminal, go to the module's root folder
devtoolkit_docker/orderhub-code/<module-name> and run the
following command to build the package for
deployment.
yarn package-customization
- Run the following command to publish the changes. This command assumes that the
features.json
file exists in the module's root directory.yarn orderhub-cli publish-customization --client-id=<clientId> --client-secret=<clientSecret> --package-name=<module-name>
- Open the <module-name>/package.json file and add the
following
line.
- If you want to delete the customizations manually, complete the following steps.
- Create a
dist/<module-name>
directory in the <module-name> folder. - Add
.deletemodule
file underdist/<module-name>
. For example,devtoolkit_docker/orderhub-code/custom-app/dist/custom-app/.deletemodule
- Open the <module-name>/features.json file and set the
state value to MARK_FOR_DELETE.For example,
"state": "MARK_FOR_DELETE",
- Run the following command to publish the changes. This command assumes that the
features.json
file exists in the module's root directory.yarn orderhub-cli publish-customization --client-id=<clientId> --client-secret=<clientSecret> --package-name=<module-name>
- Create a
Deleting multiple modules (manual)
You can delete multiple customizations together by completing the following steps.
- Create an assets.zip file with the structure
<module-name>/.deletemodule. For example,
- Run the following curl command.
curl -v -X POST $BUC_HOSTNAME/cw/spi/resources/customization/config/upload -H "x-ibm-client-id: $CLIENT_ID" -H "x-ibm-client-secret: $CLIENT_SECRET" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "asset=@assets.zip;type=application/x-zip-compressed"
- BUC_HOSTNAME: Use the following
URL.
https://app.omsbusinessusercontrols.ibm.com
- $CLIENT_ID: The customization client ID for the tenant.
- $CLIENT_SECRET: The customization auth key for the tenant.
- BUC_HOSTNAME: Use the following
URL.