Skip to content

ci: add Testing Farm test via tmt for Konflux CI#4515

Open
Roshan-R wants to merge 1 commit intocoreos:mainfrom
Roshan-R:tmt-testing
Open

ci: add Testing Farm test via tmt for Konflux CI#4515
Roshan-R wants to merge 1 commit intocoreos:mainfrom
Roshan-R:tmt-testing

Conversation

@Roshan-R
Copy link
Copy Markdown
Contributor

Add tmt test infrastructure to hook into Konflux CI via Testing Farm

The new test pulls the newly built coreos-assembler container image and verifies that it can successfully build a Fedora CoreOS image from scratch using a fedora-coreos-config checkout.

Add tmt test infrastructure to hook into Konflux CI via Testing Farm

The new test pulls the newly built coreos-assembler container image and
verifies that it can successfully build a Fedora CoreOS image from
scratch using a fedora-coreos-config checkout.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a TMT-based testing framework for coreos-assembler, including Tekton integration for Testing Farm, TMT plans, and a test script for containerized builds. The reviewer identified several improvement opportunities: replacing hardcoded Git references in the Tekton configuration with dynamic parameters, refining the list of required packages in the TMT plan to include podman, and enhancing the test script's reliability by ensuring directory existence and applying proper variable quoting.

Comment on lines +19 to +21
value: https://github.com/Roshan-R/coreos-assembler
- name: GIT_REF
value: tmt-testing
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The GIT_URL and GIT_REF parameters are currently hardcoded to a personal fork and a specific branch (Roshan-R/coreos-assembler and tmt-testing). For integration into the main repository, these should be updated to point to the official repository or use dynamic Tekton parameters to ensure the tests are executed against the correct source code.

Comment on lines +7 to +9
- wget
- jq
- git
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The packages wget, jq, and git are being installed in the test environment but do not appear to be used by the host-side test.sh script. The git command used in the test is executed inside the coreos-assembler container. Conversely, the script relies on podman, which should be explicitly listed if it is not guaranteed to be present in the base image.

      - podman


# IMAGE_URL is the coreos-assembler image that is built by konflux for each run.
export COREOS_ASSEMBLER_CONTAINER="$IMAGE_URL"
export COSA_DIR=$HOME/workspace/build
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

It is recommended to ensure that the $COSA_DIR directory exists before it is mounted as a volume. If the directory is missing, podman might create it with root ownership, which can lead to permission issues for the builder user inside the container. Additionally, quoting the path is a best practice to handle potential spaces.

Suggested change
export COSA_DIR=$HOME/workspace/build
export COSA_DIR="$HOME/workspace/build"
mkdir -p "$COSA_DIR"

Comment on lines +10 to +12
podman run --rm --security-opt=label=disable --privileged \
-v=${COSA_DIR}:/srv/ --device=/dev/kvm \
--device=/dev/fuse --tmpfs=/tmp -v=/var/tmp:/var/tmp --name=cosa ${COREOS_ASSEMBLER_CONTAINER} "$@";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The volume mount and image variable should be quoted to prevent word splitting or issues with special characters. Also, the trailing semicolon at the end of the command is unnecessary in a bash script.

Suggested change
podman run --rm --security-opt=label=disable --privileged \
-v=${COSA_DIR}:/srv/ --device=/dev/kvm \
--device=/dev/fuse --tmpfs=/tmp -v=/var/tmp:/var/tmp --name=cosa ${COREOS_ASSEMBLER_CONTAINER} "$@";
podman run --rm --security-opt=label=disable --privileged \
-v "${COSA_DIR}:/srv/" --device=/dev/kvm \
--device=/dev/fuse --tmpfs=/tmp -v /var/tmp:/var/tmp --name=cosa "${COREOS_ASSEMBLER_CONTAINER}" "$@"

@Roshan-R
Copy link
Copy Markdown
Contributor Author

Roshan-R commented Apr 1, 2026

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant