...
Code Block |
---|
# Rule attributes @AssetType("data_intg_flow") @AssetType("data_intg_subflow") package datamigrators @Documentation(“http://docs.ibm.com/cp4d/compliance/Job does_not_contain_unit_test_parameter”) @SomeAttribute(“Some value”) @SomeOtherAttribute(“Some other value”) # Rule tags (effectively user-defined, free-form attributes) @Tag(“security, portability, maintainability, fail-ci, CorpDataWarehouse, CheeseSandwichTeam”) # Rule definition if (!(item.parameters.any { paramName, param -> paramName.contains("DM_ENABLE_UNIT_TESTING") })) { compliance.failure("MettleCI Unit Test job parameter has not been added to this job"); };<blah blah blah> |
Attributes are used to add extra information to the Rule which are used by the various MettleCI tools (Workbench, CLI) to change their behaviour. The one attribute of interest to end users is @AssetType
. This defines the type of DataStage asset to which the rule can be applied. All rules (whether those dveloped developed by customers or supplied by Data Migrators) require an @AssetType
tag.
Info |
---|
If you add a |
Rule Tags
Each MettleCI Compliance rule can include extra metadata using a set of user-specified values which are referred to as ‘tags’. Each Compliance rule may specify zero or more ‘tags’ which are free-form text labels associated with each rule.
...