-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #763 from sbeskin-redhat/MTA_1220_fixed
MTA-1220 fixed
- Loading branch information
Showing
15 changed files
with
1,052 additions
and
331 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// * docs/rules-development-guide/master.adoc | ||
|
||
:_content-type: PROCEDURE | ||
[id="create-basic-yaml-rule-template_{context}"] | ||
= Creating a basic YAML rule template | ||
|
||
{ProductShortName} YAML-based rules have the following basic structure: | ||
|
||
[source,terminal] | ||
---- | ||
when(condition) | ||
message(message) | ||
tag(tags) | ||
---- | ||
.Procedure | ||
|
||
. In the `/home/<USER>/` directory, create a file containing the basic syntax for YAML rules as follows: | ||
+ | ||
[source,terminal] | ||
---- | ||
- category: mandatory | ||
description: | | ||
<DESCRIPTION TITLE> | ||
<DESCRIPTION TEXT> | ||
effort: <EFFORT> | ||
labels: | ||
- konveyor.io/source=<SOURCE_TECH> | ||
- konveyor.io/target=<TARGET_TECH> | ||
links: | ||
- url: <HYPERLINK> | ||
title: <HYPERLINK_TITLE> | ||
message: <MESSAGE> | ||
tag: | ||
- <TAG1> | ||
- <TAG2> | ||
ruleID: <RULE_ID> | ||
when: | ||
<CONDITIONS> | ||
---- | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// * docs/rules-development-guide/master.adoc | ||
|
||
:_content-type: PROCEDURE | ||
[id="create-basic-yaml-ruleset-template_{context}"] | ||
= Creating a basic YAML ruleset template | ||
|
||
If you want to group multiple similar rules, you can create a ruleset for them by placing their files in a directory and creating a `ruleset.yaml` file at the directory's root. When you pass this directory as input to the {ProductShortName} {CLIName} using the `--rules` option, {ProductShortName} treats all the files in the directory as belonging to the ruleset defined in the `ruleset.yaml` file. | ||
|
||
.Procedure | ||
|
||
. Create a template for `ruleset.yaml` files if you want to pass the entire directory using the `--rules` option: | ||
+ | ||
[source,terminal] | ||
---- | ||
name: <RULESET_NAME> <1> | ||
description: <RULESET_DESCRIPTION> | ||
labels: <2> | ||
- key=val | ||
---- | ||
<1> The name must be unique within the provided rulesets. | ||
+ | ||
<2> Ruleset labels are inherited by all rules that belong to the ruleset. |
Oops, something went wrong.