When your business needs change, you can modify or delete a delivery chain. For example, you can modify the image building rules, blocking rules for image security scanning, image synchronization rules, and distribution triggers for a delivery chain as required. This topic describes how to modify or delete a delivery chain.

Modify basic information about a delivery chain

Modify basic information about a delivery chain, such as the delivery chain name and description.

  1. Log on to the Container Registry console. In the top navigation bar, select the target region.
  2. In the left-side navigation pane, choose Enterprise Instances > Instances.
  3. On the Instances page, click the Container Registry Enterprise Edition instance to be configured.
  4. In the left-side navigation pane, choose Delivery chain > Delivery chain.
  5. On the page that appears, select the namespace of the delivery chain to be modified.
    Note By default, this page lists delivery chains in all namespaces.
  6. Find the target delivery chain and click Manage in the Actions column.
  7. On the delivery chain configuration page that appears, click Modify Settings in the upper right corner.
  8. In the Basic Information section, modify the following parameters as required and click Confirm.
    • Name
    • Description

Modify image building rules

You can add, modify, or delete image building rules as required.

Add or modify an image building rule

  1. In the wizard of creating a delivery chain, click the Image Building icon.
  2. In the Task configuration section, add or modify image building rules.
    • To add a rule, click Add Build Rule. The Add Build Rule dialog box appears.
    • To modify a rule, click Modify for the rule. The Modify dialog box appears.
    The dialog boxes contain the following parameters:
    • Type: Select a type for the source code repository. Valid values: Branch and Tag.
    • Code Branch/Tag: Set the code branch for building images.
    • Dockerfile Directory: Set the directory for storing the Dockerfile.
      Note The specified directory is a relative directory, with the root directory of the code branch as its parent directory.
    • Dockerfile Filename: Set the Dockerfile file name. Default value: Dockerfile.
    • Tag: Set a tag for the image, for example, latest.
  3. Click OK.
    In the Task configuration section, you can view the added or modified image building rules.

Delete an image building rule

  1. On the delivery chain overview page, click the Image Building icon.
  2. In the Task configuration section, find the target image building rule and click Delete in the Actions column.
  3. In the Delete Warning dialog box that appears, click OK.

Modify blocking rules for image security scanning

You can modify blocking rules for image security scanning based on your actual security requirements.

  1. In the wizard of creating a delivery chain, click the Security Scan icon.
  2. In the Node configuration section, configure the blocking rule.
    • Blocking: You must set the Vulnerability Severity and Number of vulnerabilities parameters to define the blocking rule.

      If an image meets conditions defined in the blocking rule, the system stops performing follow-up steps for the image. Otherwise, the system proceeds with follow-up steps.

    • Non-blocking: The system proceeds with follow-up steps for all images.

Modify image synchronization rules

You cannot directly modify image synchronization rules of a delivery chain. If an image synchronization rule needs to be modified, you can delete it and create a new one.

Create an image synchronization rule

  1. In the wizard of creating a delivery chain, click the Trigger Synchronization icon.
  2. In the Task configuration section, click Create Rule.
  3. In the Create Rule dialog box, enter the rule name and configure the Container Registry Enterprise Edition instance to which you want to synchronize images.
    • If the Container Registry Enterprise Edition instance exists, select it in the target region.
    • If the Container Registry Enterprise Edition instance does not exist, click Create Instance to create it. For more information, see Create a Container Registry Enterprise Edition instance.
    Note If access over the public network is disabled, images can be automatically synchronized between regions.
  4. Click Next to go to the page for configuring synchronization information.
  5. Configure the images to be synchronized on the source instance.
    1. Set the Replication Level parameter.
      • Namespace: All images in the specific namespace of the source instance are synchronized.
      • Repository: Only images in the specific repository are synchronized.
    2. Select the namespace of the source instance to be synchronized.
    3. Optional:If the Replication Level parameter is set to Repository, select the source repository.
    4. Enter a regular expression for filtering repository versions. By default, all repository versions are synchronized.
  6. Click Create Rule.
    In the Task configuration section, you can view the newly created image synchronization rules.

Delete an image synchronization rule

  1. On the delivery chain overview page, click the Trigger Synchronization icon.
  2. In the Task configuration section, find the target image synchronization rule and click Delete in the Actions column.
  3. In the Delete Warning dialog box that appears, click OK.
    The Delete Successfully message appears.

Modify distribution triggers

You can modify distribution triggers to change the rules for redeploying applications.

  1. On the delivery chain overview page, click the Distribution Trigger icon.
  2. In the Task configuration section, find the target distribution trigger and click Modify in the Actions column.
  3. In the Modify Trigger dialog box that appears, modify the following parameters as required and click OK.
    • Trigger Name
    • Target URL
    • Trigger
      • Every time: All images are distributed.
      • Expression trigger: Only images matching the preset regular expression are distributed.
      • Tag triggers: Only images with the selected tags are distributed.
    After you modify these parameters, you can view the modified values in the Task configuration section.

Delete a delivery chain

You can delete a delivery chain no longer required.

  1. Log on to the Container Registry console. In the top navigation bar, select the target region.
  2. In the left-side navigation pane, choose Enterprise Instances > Instances.
  3. On the Instances page, click the Container Registry Enterprise Edition instance to be configured.
  4. In the left-side navigation pane, choose Delivery chain > Delivery chain.
  5. On the page that appears, find the target delivery chain and click Delete in the Actions column.
  6. In the Delete Warning dialog box that appears, click OK.
    The Delete Successfully message appears.