Updated on 2024-05-08 GMT+08:00

Project-level Policies

Policy Entry

Go to the pipeline list of a project, click More in the upper right corner, and select Policies from the drop-down list. The project-level policy management page is displayed.

Creating a Policy

Click Create Policy. Enter a policy name, select a rule, and click Confirm.

A maximum of 20 rules can be selected for a policy.

The selected rules will be displayed in the right pane. You can perform the following operations on each rule:

  • Enable/Disable: You can click the switch in the upper right corner to enable/disable the rule. After the rule is disabled, it will not take effect in the pass conditions.
  • Edit: Click Detail in the upper right corner of the rule to view the details. Click Edit in the upper right corner to edit the rule as needed.

Editing a Policy

On the project-level policy management page, click in the Operation column. On the displayed page, edit the policy and click Save.

The page for editing a policy is similar to that for creating a policy.

Copying a Policy

On the project-level policy management page, click in the Operation column and select Copy.

The page for copying a policy is similar to that for creating a policy.

Deleting a Policy

On the project-level policy management page, click in the Operation column and select Delete. On the displayed page, confirm the deletion.

When you delete a policy, the system displays a message indicating the number of pipelines that use the policy. Once the policy is deleted, pipeline execution will fail.

Disabling a Policy

On the project-level policy management page, click the switch on the right side of the target policy to disable it.

If a policy is disabled, the system displays a message indicating the number of pipelines that use the policy. Once the policy is disabled, it will not take effect in the pass conditions.

Tenant-level Policies

On the project-level policy management page, click Tenant Policies in the upper right corner. In the displayed dialog box, you can view, copy, or inherit a tenant-level policy.

  • View: Click in the Operation column to view the tenant-level policy.
  • Copy: Click in the Operation column. On the displayed page, edit the policy and click Save.
  • Inherit: Click in the Operation column. On the displayed page, edit the policy and click Save.

    Rules configured in the parent policy cannot be canceled or disabled in the inherited project-level policy.