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.
    1. Open the <module-name>/package.json file.
    2. Modify the package-customization script:
      "package-customization": "mkdir -p dist/<module-name> && touch dist/<module-name>/.deletemodule"
    3. 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
    4. 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.
    1. Create a dist/<module-name> directory in the <module-name> folder.
    2. Add .deletemodule file under dist/<module-name>. For example,
      devtoolkit_docker/orderhub-code/<module-name>/dist/<module-name>/.deletemodule
    3. 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.
    1. Open the <module-name>/package.json file and add the following line.
      "package-customization": "mkdir -p dist/<module-name> && touch dist/<module-name>/.deletemodule"
      Where <module-name> is the name of the module, for example custom-app.
    2. Open the <module-name>/features.json file and set the state value to MARK_FOR_DELETE.
      For example,
      "state": "MARK_FOR_DELETE",
    3. 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
    4. 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.
    1. Create a dist/<module-name> directory in the <module-name> folder.
    2. Add .deletemodule file under dist/<module-name>. For example,
      devtoolkit_docker/orderhub-code/custom-app/dist/custom-app/.deletemodule
    3. Open the <module-name>/features.json file and set the state value to MARK_FOR_DELETE.
      For example,
      "state": "MARK_FOR_DELETE",
    4. 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 multiple modules (manual)

You can delete multiple customizations together by completing the following steps.
  1. Create an assets.zip file with the structure <module-name>/.deletemodule. For example,
    Screen capture of the folder structure
  2. 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.
    To get the $CLIENT_ID and $CLIENT_SECRET, see Enabling the customization menu for a tenant.