When your business needs change, you can modify or delete a delivery chain. For example, you can modify the image building rules, the blocking rule 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.
  2. In the top navigation bar, select a region.
  3. In the left-side navigation pane, click Instances.
  4. On the Instances page, click the required Container Registry Enterprise Edition instance.
  5. On the management page of the Container Registry Enterprise Edition instance, choose Delivery Chain > Chain in the left-side navigation pane.
  6. On the Chain page, select the namespace of the delivery chain that you want to modify.
    Note By default, this page lists delivery chains in all namespaces.
  7. Find the delivery chain that you want to modify and click Manage in the Actions column.
  8. In the Details section, modify the name and description of the delivery chain as needed.

Modify image building rules

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

Create 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 Details page, click the Image Building icon.
  2. In the Chain section, find the image building rule that you want to delete and click Delete in the Actions column.
  3. In the Delete message, click OK.

Modify the blocking rule for image security scanning

You can modify the blocking rule for image security scanning based on your 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 another 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 Details page, click the Trigger Synchronization icon.
  2. In the Chain section, find the image synchronization rule that you want to delete and click the Delete icon in the Actions column.
  3. In the Delete message, 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 Details page, click the Distribution Trigger icon.
  2. In the Chain section, find the distribution trigger that you want to modify and click Modify in the Actions column.
  3. In the Modify Trigger dialog box, modify the following parameters as required and click Confirm.
    • Name
    • Trigger URL
    • Trigger
      • All: All images are distributed.
      • By RegExp: You need to enter a regular expression to filter images. Only images that match the regular expression are distributed.
      • By Tags: Select image tags. Only images with the selected tags are distributed.
    After you modify these parameters, you can view the changed values in the Chain section.

Delete a delivery chain

You can delete a delivery chain that is no longer needed.

  1. Log on to the Container Registry console.
  2. In the top navigation bar, select a region.
  3. In the left-side navigation pane, click Instances.
  4. On the Instances page, click the required Container Registry Enterprise Edition instance.
  5. On the management page of the Container Registry Enterprise Edition instance, choose Delivery Chain > Chain in the left-side navigation pane.
  6. On the Chain page, find the delivery chain that you want to delete and click Delete in the Actions column.
  7. In the Delete message, click OK.
    The Delete Successfully message appears.