Gating

Table of Contents

Enable

Gating of packages based on test results is currently enabled on demand. If you want to turn the gating on for your component create a new file gating.yaml in the root of the package dist git directory with the following content:

Enable gate to the testing repository:

--- !Policy
product_versions:
  - fedora-*
decision_context: bodhi_update_push_testing
subject_type: koji_build
rules:
  - !PassingTestCaseRule {test_case_name: org.centos.prod.ci.pipeline.allpackages-build.package.test.functional.complete}

Enable gate to the stable repository (use this one for gating rawhide):

--- !Policy
product_versions:
  - fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
  - !PassingTestCaseRule {test_case_name: org.centos.prod.ci.pipeline.allpackages-build.package.test.functional.complete}
In order to enable both gates, simply concatenate both examples above.

This will enable gating for all Fedora releases based on the result of the CI Pipeline. The decision_context is to be clarified. Rules define test cases that should be considered for the gating decision, in this case org.centos.prod.ci.pipeline.allpackages-build.package.test.functional.complete which are tests that were run in the CI based on the configuration in tests/tests.yml in package’s dist-git. Other tests which can be enabled for gating:

  • dist.rpmdeplint - to make sure the update’s dependencies are available

  • dist.abicheck - to make sure the update’s ABI remains stable in stable Fedora releases

See Greenwave’s Package-specific policies for more technical details about setting the policy.

Waive

If the failed test result is irrelevant you can waive it using the Bodhi web interface or directly from the command line:

# List blocking test results
bodhi updates waive <id> --show
# Specify which tests to waive via:
bodhi updates waive <id> --test="dist.rpmlint" --test="atomic-ci" "Comment explaining the waiver"
# Waive all tests:
bodhi updates waive <id> --test=all "Comment explaining the waiver"

While the web UI only allows to waive all tests, command line provides a way to select tests which should be waived.