diff --git a/roles/openshift-apps/greenwave/templates/fedora.yaml b/roles/openshift-apps/greenwave/templates/fedora.yaml index d472462068..5411384041 100644 --- a/roles/openshift-apps/greenwave/templates/fedora.yaml +++ b/roles/openshift-apps/greenwave/templates/fedora.yaml @@ -1,5 +1,81 @@ +# kojibuild_ policies are for koji_build subjects; Fedora CI runs tests at +# at the Koji build level and report results which will be found by queries +# against these policies. + +# bodhiupdate_ policies are for bodhi_update subjects; Fedora openQA runs +# tests at the Bodhi update level and reports results which will be found by +# queries against these policies. + +# As of 2020-11, we know that Bodhi runs queries for both of these subject +# types when deciding whether to push updates to various stages (these are the +# decision contexts), and expects a successful result to its queries. + +# compose_ policies are for compose subjects; Fedora openQA runs tests at +# the compose level (for composes containing deliverables it can test) and +# reports results which will be found by queries against these policies. +# As of 2020-11, we know the check-compose tool that generates "compose +# check reports" queries this subject type for the +# rawhide_compose_sync_to_mirrors decision context and reports the result +# for each Rawhide compose, saying whether it "would have" passing gating +# or not (actual gating of compose syncs has not yet been implemented). + +# note that policies are *additive*. If a query matches multiple of these +# policies, all the relevant test results are retrieved, and rules in all +# the matched policies are applied. + +# This is a "null" policy: it enforces no rules, its purpose is just to +# exist, so that we always have at least one policy that matches +# queries for the 'koji_build' subject type and the covered versions and +# contexts. This is a fallback for Bodhi queries that we know will run +# and expect a successful result, but which Greenwave will error on if +# no policy matches. Note no "null" policy is needed for subject_type +# bodhi_update because Greenwave by default ignores missing policies for +# that subject type. --- !Policy -id: "openqa_important_stuff_for_rawhide" +id: "kojibuild_bodhipush_no_requirements" +product_versions: + - fedora-* +decision_contexts: + - bodhi_update_push_testing + - bodhi_update_push_stable +subject_type: koji_build +rules: [] + +# The "remoterule" policies apply policies configured in individual +# package repositories. See Greenwave docs/policies.rst and +# https://docs.fedoraproject.org/en-US/ci/gating/ for details. +--- !Policy +id: "kojibuild_bodhipush_remoterule" +product_versions: + - fedora-rawhide + - fedora-34 + - fedora-33 + - fedora-32 +decision_contexts: + - bodhi_update_push_testing + - bodhi_update_push_stable +subject_type: koji_build +rules: + - !RemoteRule {} + +--- !Policy +id: "bodhiupdate_bodhipush_remoterule" +product_versions: + - fedora-rawhide + - fedora-34 + - fedora-33 + - fedora-32 +decision_contexts: + - bodhi_update_push_testing + - bodhi_update_push_stable +subject_type: bodhi_update +rules: + - !RemoteRule {} + +# This policy lists tests that are expected to pass for a Rawhide compose to +# meet the basic release criteria. +--- !Policy +id: "compose_sync_requiredtests" product_versions: - fedora-rawhide decision_context: rawhide_compose_sync_to_mirrors @@ -49,125 +125,3 @@ rules: - !PassingTestCaseRule {test_case_name: compose.server_role_deploy_database_server, scenario: "fedora.Server-dvd-iso.x86_64.64bit"} - !PassingTestCaseRule {test_case_name: compose.server_role_deploy_domain_controller, scenario: "fedora.Server-dvd-iso.x86_64.64bit"} ---- !Policy -# _kojibuild_ policies are for koji_build subjects; Fedora CI tests run at -# at the Koji build level and report results which will be found by these -# policies. We must have at least one kojibuild policy for each Fedora -# version Bodhi might operate on (because ignore_missing_policy is false -# for the koji_build subject type, as config stands at 2020-11, so Bodhi -# will fail if it queries Greenwave and no koji_build policy matches the -# query terms). - -# _update_ policies are for bodhi_update subjects; Fedora openQA tests run -# at the Bodhi update level and report results which will be found by these -# policies. ignore_missing_policy is true for the bodhi_update subject type -# (in upstream Greenwave default config, as of 2020-11) so it is OK for -# there not to be any matching policy of this type that matches when Bodhi -# queries. - -# note that policies are *additive*. If a query matches multiple of these -# policies, all the rules in all the matched policies are applied. - -id: "fedora_mainline_kojibuild_remoterule" -product_versions: - - fedora-rawhide - - fedora-34 - - fedora-33 - - fedora-32 -decision_context: bodhi_update_push_testing -subject_type: koji_build -rules: - # this means "apply gating configs in package repos" - # see Greenwave docs/policies.rst for more details - - !RemoteRule {} - ---- !Policy -id: "fedora_mainline_kojibuild_remoterule" -product_versions: - - fedora-rawhide - - fedora-34 - - fedora-33 - - fedora-32 -decision_context: bodhi_update_push_stable -subject_type: koji_build -rules: - # this means "apply gating configs in package repos" - # see Greenwave docs/policies.rst for more details - - !RemoteRule {} - ---- !Policy -id: "kojibuild_no_requirements_testing" - # this is a null policy, it enforces no requirements. It is needed - # because at least one policy must match for koji_build subjects. - # if a query matches this policy and no other, no requirements will - # be applied -product_versions: - - fedora-34-modular - - fedora-34-containers - - fedora-34-flatpaks - - fedora-33-modular - - fedora-33-containers - - fedora-33-flatpaks - - fedora-32-modular - - fedora-32-containers - - fedora-32-flatpaks - - fedora-epel-8 - - fedora-epel-8-modular - - fedora-epel-7 - - fedora-eln -decision_context: bodhi_update_push_testing -subject_type: koji_build -rules: [] - ---- !Policy -id: "kojibuild_no_requirements_stable" - # this is a null policy, it enforces no requirements. It is needed - # because at least one policy must match for koji_build subjects. - # if a query matches this policy and no other, no requirements will - # be applied -product_versions: - - fedora-34-modular - - fedora-34-containers - - fedora-34-flatpaks - - fedora-33-modular - - fedora-33-containers - - fedora-33-flatpaks - - fedora-32-modular - - fedora-32-containers - - fedora-32-flatpaks - - fedora-epel-8 - - fedora-epel-8-modular - - fedora-epel-7 - - fedora-epel-6 - - fedora-eln -decision_context: bodhi_update_push_stable -subject_type: koji_build -rules: [] - ---- !Policy -id: "fedora_mainline_update_rules_for_testing" -product_versions: - - fedora-rawhide - - fedora-34 - - fedora-33 - - fedora-32 -decision_context: bodhi_update_push_testing -subject_type: bodhi_update -rules: - # this means "apply gating configs in package repos" - # see Greenwave docs/policies.rst for more details - - !RemoteRule {} - ---- !Policy -id: "fedora_mainline_update_rules_for_stable" -product_versions: - - fedora-rawhide - - fedora-34 - - fedora-33 - - fedora-32 -decision_context: bodhi_update_push_stable -subject_type: bodhi_update -rules: - # this means "apply gating configs in package repos" - # see Greenwave docs/policies.rst for more details - - !RemoteRule {}