Disable a rule
This topic explains how to disable rules in Deploy by modifying the xl-rules.xml file
It includes:
- Predefined in Deploy
- Defined in the
XL_DEPLOY_SERVER_HOME/ext/xl-rules.xml
file - Defined in
xl-rules.xml
files in plugin JARs
To disable a rule, add the disable-rule
tag under the rules
tag in xl-rules.xml
. You identify the rule that you want to disable by its name (this is why rule names must be unique).
For example, to disable a rule with the name deployArtifact
, use:
<?xml version="1.0"?>
<rules xmlns="http://www.xebialabs.com/deploy/xl-rules">
<disable-rule name="deployArtifact" />
</rules>
Predefined rule naming
You can disable the rules that are predefined by Java classes in Deploy. Methods used to define steps are translated into a corresponding rule. This section describes the naming convention for each type of predefined rule.
Deployed system rules
All methods of deployed classes are annotated with @Create
, @Modify
, @Destroy
, @Noop
. The name of the rule is given by concatenation of the UDM type of the deployed class, the method name, and annotation name. For example:
file.DeployedArtifactOnHost.executeCreate_CREATE
Contributor system rules
All methods that are annotated with @Contributor
annotations. The rule name is defined by concatenation of the full class name and method name. For example:
com.xebialabs.deployit.plugin.generic.container.LifeCycleContributor.restartContainers
Pre-plan and post-plan system rules
All methods that are annotated with @PrePlanProcessor
or @PostPlanProcessor
annotations. The rule name is defined by concatenation of the full class name and method name. For example:
com.xebialabs.deployit.plugins.releaseauth.planning.CheckReleaseConditionsAreMet.validate