Uploading the features.json file

This procedure is applicable when you are hosting the custom feature build artifacts on an external server instead of uploading it to IBM for hosting. All your build assets can exist on the external server but you need to upload the features.json file to the Order Hub repository.

Before you begin

Review the list of values that you need to set up a continuous integration continuous delivery (CI/CD) pipeline:
Customization client ID and key
Retrieve the Customization ID and Customization key values for each of your tenants. For more information, see Enabling the customization menu for a tenant.
$BUC_HOSTNAME
The URL target. Use
https://app.omsbusinessusercontrols.ibm.com

Procedure

  1. Configure the feature in the user interface to point to the external hosting server.
    1. Log in to Order Hub.
    2. Go to Settings > Customization.
    3. Select the custom feature.
    4. Ensure that the option, Hosted by IBM, is cleared. When cleared, you see a URL field.
    5. In the URL field, specify the URL to the feature that is hosted on the external server.
      For example,
      https://www.example.com/custom-feature1
    6. Save all changes.
    7. Copy the value in the Feature json field and update the features.json file that is in your repository.
    8. Repeat steps 1.c to 1.g for all other custom features.
  2. Create or update the CI/CD pipeline for each repository branch.

    This procedure is applicable when you are hosting the custom feature build artifacts on an external server instead of uploading it to IBM for hosting.

  3. For each CI/CD pipeline, add the following parameters for the respective tenant types (DEV/QA/STAGE/PROD).
    The publish-to-buc.sh script needs the following parameters.
    • $BUC_CLIENT_ID_<branch name> = Customization client ID
    • $BUC_CLIENT_SECRET_<branch name> = Customization client key
    • $IS_HOSTED_ON_BUC = false
    • $BUC_HOSTNAME=https://app.omsbusinessusercontrols.ibm.com
  4. Ensure that the pipeline runs with the following two parameters.
    --base-href=<base_path_to_feature>
    --deploy-url=<base_path_to_feature>
    Also ensure that the URL specified in Step 1.e match the base-href value. For example,
    --base-href=custom-feature1
    --deploy-url=custom-feature1
    The publish-to-buc.sh script starts an API call to upload the features.json file to IBM.
  5. To test that your DEV tenant can connect to the external server complete the following steps.
    1. Log in to Order Hub.
    2. Go to Settings > Customization.
    3. Select the custom feature.
    4. Clear the Local development environment option.
    5. Click Save.

Results

After the pipeline completes on the specified branch (develop, master, release, or production), the features.json file is uploaded to IBM. The associated tenants (DEV, QA, STAGE, PROD) are updated, and the custom features are available in the user interface.