From 849622b02c9761dbb7b4c5ea08dcf189eeabc83f Mon Sep 17 00:00:00 2001 From: Laura Barcziova Date: Fri, 30 Jan 2026 11:52:04 +0100 Subject: [PATCH] Document TMT integration in Fedora CI Related to https://github.com/packit/packit-service/pull/2935 --- fedora-ci/index.md | 1 + fedora-ci/jobs.md | 3 +++ fedora-ci/tmt-integration.md | 29 +++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 fedora-ci/tmt-integration.md diff --git a/fedora-ci/index.md b/fedora-ci/index.md index a7a6db592f..79fc692884 100644 --- a/fedora-ci/index.md +++ b/fedora-ci/index.md @@ -17,3 +17,4 @@ For more info continue with: - [Retriggering](fedora-ci/retriggering.md) - [Configuration](fedora-ci/configuration.md) - [Development](fedora-ci/development.md) +- [TMT Integration](fedora-ci/tmt-integration.md) diff --git a/fedora-ci/jobs.md b/fedora-ci/jobs.md index c9dd569512..e1be067de0 100644 --- a/fedora-ci/jobs.md +++ b/fedora-ci/jobs.md @@ -32,3 +32,6 @@ Custom [TMT](https://tmt.readthedocs.io/) test plans in [Testing Farm](https://t run with a successful scratch build. This requires TMT metadata (`.fmf/version` presence used as an indicator) in the dist-git repository and at least one [test plan](https://tmt.readthedocs.io/en/stable/spec/plans.html) in `plans`. + +For information about available TMT contexts and environment variables you can use +in your test plans, see [TMT Integration](/fedora-ci/tmt-integration). diff --git a/fedora-ci/tmt-integration.md b/fedora-ci/tmt-integration.md new file mode 100644 index 0000000000..b5a3b196ec --- /dev/null +++ b/fedora-ci/tmt-integration.md @@ -0,0 +1,29 @@ +--- +title: TMT Integration +sidebar_position: 5 +--- + +When running tests in Fedora CI, Packit automatically provides TMT context dimensions and environment variables that you can use in your test plans to adjust behavior based on the target branch, distribution, or other factors. + +## TMT Context Dimensions + +The following TMT context dimensions are automatically set by Packit for for rpminspect, rpmlint, and custom Fedora CI test jobs: + +| Context | Description | Example Values | +| ----------------- | ---------------------------------- | ---------------------------------------------- | +| `arch` | Processor architecture | `x86_64` | +| `distro` | Distribution/compose being tested | `centos-stream-9`, `centos-stream-10` | +| `dist-git-branch` | Target branch of the dist-git PR | `rawhide`, `f41`, `f40`, `epel-9`, `epel-10.1` | +| `initiator` | Who triggered the test | `fedora-ci` (vs `packit` for upstream) | +| `trigger` | Event type that triggered the test | `commit` | + +## Environment Variables + +### KOJI_TASK_ID + +The Koji task ID for the scratch build created for this dist-git PR (e.g., `123014869`). + +## See Also + +- [TMT Context Documentation](https://tmt.readthedocs.io/en/stable/spec/context.html) +- [Testing Farm Documentation](https://docs.testing-farm.io/)