Customizing Policy
An Enterprise Contract Policy defines which checks are performed by EC during integration tests and release. If EC reports violations, the best course of action, in most cases, is to adjust the build process to remedy the violation. For example, if EC reports that a certain required scanner was not executed, add the scanner to your build pipeline. Read the text associated with the violation as that often provides context-specific information to help remedy violations.
However, there are times where remedying the violation is not an option. In this case, customizing the Policy is the only option to waive the failing check.
-
Identify which Policy is being used to verify the Components in your Application.
-
Determine if this is a Policy you can modify. Policies are often shared between different users. Adding an exception to a shared Policy may not be in the best interest of all users. Creating a new Policy for your particular use case may be a better approach. You can copy an existing Policy as a starting point.
-
Update your Policy to exclude a certain violation. See the Policy Configuration docs for details and examples.
-
Update your integration tests and the ReleasePlanAdmission to use the new Policy.
-
If needed, re-run the integration tests or release.