From e09dd4b3ef0e311af4eac053b7652210d1181e9d Mon Sep 17 00:00:00 2001 From: Petr Šplíchal Date: Oct 26 2020 09:55:27 +0000 Subject: Add a pull request template, update tmt questions Create a new Fedora section with pull request information. Include an example pull request description with useful hints. Update Fedora CI status in the questions section. --- diff --git a/modules/ROOT/pages/tmt.adoc b/modules/ROOT/pages/tmt.adoc index c3ee005..6ad7cad 100644 --- a/modules/ROOT/pages/tmt.adoc +++ b/modules/ROOT/pages/tmt.adoc @@ -127,27 +127,6 @@ Check all available prepare options: tmt run prepare --help -=== Pull Requests === - -In order to test a pull request on GitHub enable the https://github.com/marketplace/packit-as-a-service[Packit-as-a-Service] integration and add a `.packit.yaml` configuration file: - - jobs: - - job: tests - trigger: pull_request - metadata: - targets: - - fedora-all - -For more details see the https://packit.dev/testing-farm/[Testing Farm] documentation. -Once the integration is enabled push the branch, create a new pull request as ususal and wait for results: - - git push origin -u enable-tests - -[NOTE] -==== -Fedora CI support for tmt tests is coming in August/September 2020. -==== - == Create Test == @@ -203,6 +182,62 @@ Use beakerlib template to create a new beakerlib test: Update test metadata and code as needed, use `tmt run` to verify everything is working fine. + +== Pull Requests == + +When creating the pull request make sure you add all created files including the special `.fmf` directory. + + git add . + git commit + +=== Fedora === + +In order to test your changes in Fedora CI no additional configuration is needed. +Make sure you push the changes into your forked repository as fedora rpms/tests namespace does not allow force-push or branch removal. + + git remote add fork ssh://psss@pkgs.fedoraproject.org/forks/psss/rpms/tmt.git + git push fork -u enable-tests + +=== GitHub === + +In order to test a pull request on GitHub enable the https://github.com/marketplace/packit-as-a-service[Packit-as-a-Service] integration and add a `.packit.yaml` configuration file: + + jobs: + - job: tests + trigger: pull_request + metadata: + targets: + - fedora-all + +For more details see the https://packit.dev/testing-farm/[Testing Farm] documentation. +Once the integration is enabled push the branch, create a new pull request as ususal and wait for results: + + git push origin -u enable-tests + +=== Templates === + +When creating a pull request to enable tests in a repository with no `tmt` configuration, +include a couple of hints and links for those who are not familiar with the new tooling: + +.... +This pull request enables tests in the Fedora CI using `tmt` which +also allows to easily execute and debug tests from your laptop: + +Run tests directly on your localhost: + + sudo dnf install -y tmt + tmt run --all provision --how local + +Run tests in a virtual machine: + + sudo dnf install -y tmt-provision-virtual + tmt run + +Check the documentation to learn more about the tool: +https://docs.fedoraproject.org/en-US/ci/tmt/ +.... + + == Manage Tests == Explore available tests, convert old metadata, share test code. @@ -346,7 +381,7 @@ Does the tool replace/deprecate STI?:: Both `tmt` and `sti` approach to CI configuration can be used in parallel. Are these tests supported in Fedora CI?:: - Fedora CI support is coming in August/September 2020. + Yes, Fedora CI support is enabled for all active branches and the tests namespace as well. Which Linux distributions does the tool support?:: As a system under test (on which the tests are executed) all supported Fedora versions, Centos 6+ and Red Hat Enterprise Linux 6+ can be used.