From 6a1647099d29eff37833a514dcfeab952532390a Mon Sep 17 00:00:00 2001 From: Valerij Maljulin Date: Mar 24 2021 10:20:02 +0000 Subject: Decision contexts usage in the gating Update information about decision contexts usage in the gating This fixes greenwave#282 (https://pagure.io/greenwave/issue/282) --- diff --git a/modules/ROOT/pages/gating.adoc b/modules/ROOT/pages/gating.adoc index 7fe22f6..7b4d092 100644 --- a/modules/ROOT/pages/gating.adoc +++ b/modules/ROOT/pages/gating.adoc @@ -12,7 +12,7 @@ Enable gate to the testing repository: --- !Policy product_versions: - fedora-* - decision_context: bodhi_update_push_testing + decision_contexts: [bodhi_update_push_testing] subject_type: koji_build rules: - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} @@ -22,7 +22,7 @@ Enable gate to the stable repository (use this one for gating rawhide): --- !Policy product_versions: - fedora-* - decision_context: bodhi_update_push_stable + decision_contexts: [bodhi_update_push_stable] subject_type: koji_build rules: - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} @@ -32,10 +32,14 @@ TIP: In order to enable both gates, simply concatenate both examples above. TIP: To add another test just extend the `rules` list with additional `!PassingTestCaseRule`. This will enable gating for all Fedora releases based on the result of the CI xref:pipeline.adoc[Pipeline]. -The `decision_context` is to be https://pagure.io/greenwave/issue/282[clarified]. -Rules define test cases that should be considered for the gating decision, in this case -`fedora-ci.koji-build.tier0.functional` which are tests that were run -in the CI based on the configuration in `tests/tests.yml` in package's dist-git. +A decision context identifies set of policies used for a specific gating. +For example, `bodhi_update_push_stable` decision context is used for gating RPM builds in Bodhi updates before getting to the stable repository. + +The `decision_contexts` should match in both remote rules file and the policy in the Greenwave configuration (at least one decision context). +Rules define test cases that should be considered for the gating decision, in this case `fedora-ci.koji-build.tier0.functional` +which are tests that were run in the CI based on the configuration in `tests/tests.yml` in package's dist-git. +If no tests are required for the particular decision context(s) rules should be set to an empty list, i. e. `rules: []`, +otherwise Greenwave will return, that it could not find any applicable policies. Other tests which can be enabled for gating: