When your business needs change, you can modify 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 Enterprise Edition instance that you want to manage.
  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 the 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, click Edit next to the Name or Description parameter to modify the name or description of the delivery chain as needed. Then, click Confirm.

Modify image building rules

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

Modify an image building rule

  1. In the Chain section, click Image Building.
  2. Find the image building rule that you want to modify and click Modify in the Actions column.
  3. In the Build Information step, set the following parameters and click Next.
    ParameterDescription
    TypeSpecify the type of the source code repository. Valid values: Branch and Tag.
    Branch/TagSelect or enter a branch or a tag. Regular expressions are supported. If you specify the release-(?<imageTag>\w*) regular expression, the system automatically builds an image of V1 when the source code in the release-v1 branch is updated. The image cannot be built immediately. For more information about how to specify regular expressions, see Use regular expressions in named capturing groups.
    Note After you specify regular expressions, images can be built only by the system. You cannot manually build images.
    Dockerfile DirectorySpecify the directory of the Dockerfile. You must specify a relative directory. The parent directory is the root directory of the code branch.
    Dockerfile FilenameSpecify the name of the Dockerfile. The default name is Dockerfile.
  4. In the Tag step, configure the following parameters, click Save, and then click Next.
    Note Click Add Configuration to add an image tag. You can specify up to three image tags.
    ParameterDescription
    Image TagThe tag of the image. Example: latest. You can enable named capturing groups. For example, if you specify a named capturing group for Branch/Tag, you can use the captured content.
    Build TimeThe time when source code is pushed. The time is in UTC+8 format. Example: 20201015 or 202010151613.
    Note This parameter is optional. If you set this parameter, images can be built only by the system. You cannot manually build images.
    Commit IDThe number of characters to be obtained from the commit ID of the most recently pushed code. By default, the first six characters are used. You can adjust the slider to change the number of characters.
    Note This parameter is optional. If you set this parameter, images can be built only by the system. You cannot manually build images.
  5. In the Build Information step, set the following parameters and click Next.
    ParameterDescription
    TypeSpecify the type of the source code repository. Valid values: Branch and Tag.
    Branch/TagSelect or enter a branch or a tag. Regular expressions are supported. If you specify the release-(?<imageTag>\w*) regular expression, the system automatically builds an image of V1 when the source code in the release-v1 branch is updated. The image cannot be built immediately. For more information about how to specify regular expressions, see Use regular expressions in named capturing groups.
    Note After you specify regular expressions, images can be built only by the system. You cannot manually build images.
    Dockerfile DirectorySpecify the directory of the Dockerfile. You must specify a relative directory. The parent directory is the root directory of the code branch.
    Dockerfile FilenameSpecify the name of the Dockerfile.
  6. In the Build Configurations step, set the following parameters and click Confirm.
    ParameterDescription
    Build ArchitectureThe architecture for which you want to build images. You can select multiple architectures. If you select multiple architectures, multiple container images for the architectures are built for each image tag.
    Build ParametersThe runtime parameters of the image building. Each building parameter is a case-sensitive key-value pair. You can set a maximum of 20 building parameters.

Delete an image building rule

  1. In the Chain section, click Image Building.
  2. 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 Chain section, click Security Scan.
  2. In the Node configuration section, configure the blocking rule.
    • Security Engine: You can select Security Center scan engine or built-in scan engine.
      If vulnerabilities are detected, the Security Center scan engine allows you to fix the vulnerabilities with a few clicks. You cannot use the built-in scan engine of Container Registry to fix vulnerabilities with a few clicks.
      Note If you want to use the image scanning feature of Security Center, you must purchase the Ultimate Edition of Security Center. For more information, see Purchase Security Center. If Security Center is not activated in the current region, the option of Security Center is not displayed in the Container Registry console.
    • Block strategy:
      • Blocking: If the blocking rule is met, the system stops the subsequent steps for all images.

        You must specify the Severity and Vulnerability parameters in the blocking rule. You must specify the subsequent steps after the delivery chain is stopped, including whether to delete the original image and whether to back up the images.

      • Non-blocking: The system proceeds with subsequent 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 Chain section, click Trigger Synchronization. Then, click Create Rule.
  2. In the Create Rule dialog box, enter a rule name, specify the destination Container Registry Enterprise Edition instance, and then click Next.
    • If the destination instance already exists, select a region and select an existing instance as the destination instance.
    • If the destination instance does not exist, click Create Instance to create an instance. For more information, see Create a Container Registry Enterprise Edition instance.
    Note If access over the Internet is disabled, images can be automatically synchronized across regions.
  3. In the Replication Information wizard, configure the replication information of the source instance and click Create Rule.
    ParameterDescription
    Replication LevelSelect the replication level. Valid values: Namespaces and Repository.
    Source AddressSpecify a namespace and a repository. Enter a regular expression to filter image tags in the repositories of the namespace or in the specified repository. By default, all image tags are synchronized. You can specify the source repository only if you set the Replication Level parameter to Repository.

Delete an image synchronization rule

  1. In the Chain section, click Trigger Synchronization.
  2. 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. In the Chain section, click Distribution Trigger.
  2. Find the 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.
    ParameterDescription
    NameThe name of the trigger.
    Trigger URLThe URL to which the trigger sends notifications. You can obtain the URL from the configurations of your Container Service for Kubernetes (ACK) cluster.
    TriggerThe trigger method. Valid values:
    • All: Each time an image is updated, image distribution is triggered.
    • By RegExp: A regular expression is used to filter image tags. Image distribution is triggered only when an image tag matches the regular expression.
    • By Tags: Tags are used to filter images. Image distribution is triggered only when an image tag is in the specified tag list.

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 Enterprise Edition instance that you want to manage.
  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.