Managing custom quality gates
Two built-in quality gates are provided in your organization but you can create your own quality gates, called custom quality gates. To manage custom quality gates, you need the Administer Quality Gates permission. With this permission, you can also associate projects to quality gates in your organization.
For more information about quality gates, see Understanding quality gates.
To associate a custom quality gate with projects, see Associating projects with a quality gate.
Creating a custom quality gate
You can create a custom quality gate from scratch or by duplication. When you create a custom quality gate from scratch, the conditions of the built-in quality gate Sonar way are automatically copied to the new record to make your custom quality gate ready for Clean as You Code.
From scratch
- Retrieve your organization.
- In organization's navigation bar, select Quality Gates.
- In the left panel, select the Create button. The Create Quality Gate dialog opens.
- In the dialog, enter the name of the new quality gate and select Create.
- You can now update, add or remove the conditions of the new quality gate. See Managing a custom quality gate's conditions below.

By duplication
- Retrieve your organization.
- In organization's navigation bar, select Quality Gates.
- In the left panel, select the quality gate you want to duplicate.
- In the top right corner of the quality gate, select the More Actions button and then Copy. The Copy Quality Gate dialog opens.
- In the dialog, enter the name of the new quality gate and select Copy.
- You can now update, add or remove the conditions of the new quality gate. See Managing a custom quality gate's conditions below.

Managing a custom quality gate's conditions
You can add or remove conditions. You can update the value of an existing condition. Remember that you define failing conditions: if one of the conditions is met, the quality gate fails. For more information about conditions, see Quality gate definition based on conditions in Understanding quality gates.
To update a condition:
- Select the pen icon in the far right of the condition row. If there is no pen icon, select first the Unlock editing button, below the Conditions section.
The Update Condition dialog opens. - Enter the new condition's value and select Update Condition.
To add a new condition:
- Select Add Condition. The Add Condition dialog opens.
- In Where? select to which code, new or overall, the condition applies. New code is defined through the New Code Definition.
- In Quality Gate fails when, select the metric to which the condition applies. For information about the metrics, see Understanding measures and metrics.
- In Value, enter the condition's value.
To remove a condition:
- Select the dustbin icon in the far right of the condition row. The Delete Condition dialog opens.
- Select Delete.
Upgrading a quality gate for CaYC
We recommend configuring all your quality gates to make them Clean as You Code (CaYC) ready. For more information, see Quality gate configured for Clean as You Code in Understanding quality gates.
If your quality gate is not configured for CaYC, you can easily upgrade it as follows:
- Retrieve your organization.
- In organization's navigation bar, select Quality Gates.
- In the left panel, select the custom quality gate you want to upgrade.
- In You are a few conditions away from Clean as You Code, select Review and Update. The Update Quality Gate dialog opens.
- Review the proposed update and select Update Quality Gate to execute the update.
Renaming a custom quality gate
- Retrieve your organization.
- In organization's navigation bar, select Quality Gates.
- In the left panel, select the custom quality gate you want to rename.
- In the top right corner of your quality gate, select the More Actions button and then Rename. The Rename Quality Gate dialog opens.
- Enter the new name and select Rename.
Deleting a custom quality gate
- Retrieve your organization.
- In organization's navigation bar, select Quality Gates.
- In the left panel, select the custom quality gate you want to delete.
- In the top right corner of your quality gate, select the More Actions button and then Delete.
- Confirm the deletion.
Related pages
Was this page helpful?