Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions fedora-ci/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 3 additions & 0 deletions fedora-ci/jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
29 changes: 29 additions & 0 deletions fedora-ci/tmt-integration.md
Original file line number Diff line number Diff line change
@@ -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) |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering if the upstream note can't actually be confusing for users who haven't heard of Packit yet. I would perhaps convert this to a tip ("TIP: you can differentiate between Fedora CI and Packit upstream test jobs with initiator") and place it below the table.

| `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/)
Loading