From a58ff07e0a886a6997ad8a4a315fd5d41a5edbe5 Mon Sep 17 00:00:00 2001 From: Roshan-R Date: Wed, 22 Apr 2026 17:02:01 +0530 Subject: [PATCH 1/3] .tekton: bump pipeline-docker-build-multi-platform-oci-ta and increase memory for prepare-sboms Bump the pipeline-docker-build-multi-platform-oci-ta bundle to the latest hash. The prepare-sboms step in the build-images task requires more memory with our current workload and was hitting OOM. Increase memory requests and limits to 2Gi to ensure reliable execution. --- .tekton/coreos-assembler-pull-request.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.tekton/coreos-assembler-pull-request.yaml b/.tekton/coreos-assembler-pull-request.yaml index bee0415393..7a0a342827 100644 --- a/.tekton/coreos-assembler-pull-request.yaml +++ b/.tekton/coreos-assembler-pull-request.yaml @@ -48,7 +48,7 @@ spec: pipelineRef: params: - name: bundle - value: quay.io/konflux-ci/tekton-catalog/pipeline-docker-build-multi-platform-oci-ta@sha256:39a1abd4657035029db5e1e215333aba0cf094c3984df58e12cb157f4cb62207 + value: quay.io/konflux-ci/tekton-catalog/pipeline-docker-build-multi-platform-oci-ta@sha256:3b40c829ea489ac866149094157e3b8532896b9f150a4f15b5aaba9d0e2e6be2 - name: name value: docker-build-multi-platform-oci-ta - name: kind @@ -60,4 +60,13 @@ spec: - name: git-auth secret: secretName: '{{ git_auth_secret }}' + taskRunSpecs: + - pipelineTaskName: build-images + stepSpecs: + - name: prepare-sboms + computeResources: + requests: + memory: 2Gi + limits: + memory: 2Gi status: {} From 3c5bfc2c6f84dbccbc874061e7caf2349fce1a74 Mon Sep 17 00:00:00 2001 From: Roshan-R Date: Wed, 22 Apr 2026 17:02:12 +0530 Subject: [PATCH 2/3] ci: add Testing Farm test via tmt for Konflux CI 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. It will also run kola tests by `cosa init` into fedora-coreos-config and running `kola run` and also the upgrade test using `kola runupgrade` --- .fmf/version | 1 + tmt/plans/main.fmf | 45 +++++++++++++++++++++++++++++++++++++++++ tmt/tests/build.sh | 11 ++++++++++ tmt/tests/entrypoint.sh | 19 +++++++++++++++++ tmt/tests/init.sh | 18 +++++++++++++++++ tmt/tests/kola.fmf | 31 ++++++++++++++++++++++++++++ tmt/tests/test.sh | 39 +++++++++++++++++++++++++++++++++++ tmt/tests/utils.sh | 24 ++++++++++++++++++++++ 8 files changed, 188 insertions(+) create mode 100644 .fmf/version create mode 100644 tmt/plans/main.fmf create mode 100755 tmt/tests/build.sh create mode 100755 tmt/tests/entrypoint.sh create mode 100755 tmt/tests/init.sh create mode 100644 tmt/tests/kola.fmf create mode 100755 tmt/tests/test.sh create mode 100755 tmt/tests/utils.sh diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/tmt/plans/main.fmf b/tmt/plans/main.fmf new file mode 100644 index 0000000000..14abceb578 --- /dev/null +++ b/tmt/plans/main.fmf @@ -0,0 +1,45 @@ +adjust+: + - when: arch == x86_64 or arch == aarch64 + provision: + hardware: + cpu: + processors: ">= 4" + memory: ">= 8 GB" + disk: + - size: ">= 50 GB" + virtualization: + is-supported: true +prepare: + - how: install + package: + - libvirt + - qemu-kvm + - qemu-img + - virt-install + - jq + - git-core + - skopeo + - podman +execute: + how: tmt + exit-first: true + +/kola-qemu: + summary: run kola qemu tests + discover+: + how: fmf + test: + - init + - build-fcos + - build-qemu + - test-qemu + +/kola-test-upgrade: + summary: run kola upgrade test + discover+: + how: fmf + test: + - init + - build-fcos + - build-qemu + - test-kola-upgrade diff --git a/tmt/tests/build.sh b/tmt/tests/build.sh new file mode 100755 index 0000000000..e7c54fc0cc --- /dev/null +++ b/tmt/tests/build.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -eo pipefail +set -x + +source "utils.sh" + +if [ "$TEST_CASE" = "build-fcos" ]; then + cosa build +elif [ "$TEST_CASE" = "build-qemu" ]; then + cosa osbuild qemu +fi diff --git a/tmt/tests/entrypoint.sh b/tmt/tests/entrypoint.sh new file mode 100755 index 0000000000..e86d1da63b --- /dev/null +++ b/tmt/tests/entrypoint.sh @@ -0,0 +1,19 @@ +#!/bin/bash +set -euo pipefail + +export TEST_CASE="$TEST_CASE" +case "$TEST_CASE" in + "init") + ./init.sh + ;; + "build-fcos"|"build-qemu") + ./build.sh + ;; + "test-qemu"|"test-kola-upgrade") + ./test.sh + ;; + *) + echo "Error: Test case '$TEST_CASE' not found!" >&2 + exit 1 + ;; +esac diff --git a/tmt/tests/init.sh b/tmt/tests/init.sh new file mode 100755 index 0000000000..9930f2e06a --- /dev/null +++ b/tmt/tests/init.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -eEuo pipefail +set -x + +source "utils.sh" + +CONFIG_GIT_URL="https://github.com/coreos/fedora-coreos-config" +CONFIG_GIT_REF="testing-devel" + +echo "cosa container: $COREOS_ASSEMBLER_CONTAINER" +echo "arch: $(arch)" + +echo "git version: $(git --version)" +echo "git url: ${CONFIG_GIT_URL}" +echo "git branch: ${CONFIG_GIT_REF}" + +mkdir -p "$COSA_DIR" +cosa init --force "${CONFIG_GIT_URL}" --branch "${CONFIG_GIT_REF}" diff --git a/tmt/tests/kola.fmf b/tmt/tests/kola.fmf new file mode 100644 index 0000000000..01ed56f15a --- /dev/null +++ b/tmt/tests/kola.fmf @@ -0,0 +1,31 @@ +test: ./entrypoint.sh + +/init: + duration: 1h + order: 50 + environment: + TEST_CASE: init + +/build-fcos: + duration: 1h + order: 60 + environment: + TEST_CASE: build-fcos + +/build-qemu: + duration: 1h + order: 70 + environment: + TEST_CASE: build-qemu + +/test-qemu: + duration: 2h + order: 80 + environment: + TEST_CASE: test-qemu + +/test-kola-upgrade: + duration: 1h + order: 90 + environment: + TEST_CASE: test-kola-upgrade diff --git a/tmt/tests/test.sh b/tmt/tests/test.sh new file mode 100755 index 0000000000..47bc8aaf4f --- /dev/null +++ b/tmt/tests/test.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -eEuo pipefail +set -x + +source "utils.sh" +trap collect_kola_artifacts ERR + +if [ "$TEST_CASE" = "test-qemu" ]; then + export KOLA_ACTION="run" + export KOLA_ID="kola" + export KOLA_EXTRA_ARGS=( + --rerun + --allow-rerun-success=tags=needs-internet + --on-warn-failure-exit-77 + --tag=!reprovision + --parallel=5 + ) + run_kola + collect_kola_artifacts + + # reprovision test + export KOLA_ACTION="run" + export KOLA_ID="kola-reprovision" + export KOLA_EXTRA_ARGS=( + --tag=reprovision + ) + run_kola + collect_kola_artifacts + +elif [ "$TEST_CASE" = "test-kola-upgrade" ]; then + # upgrade test + export KOLA_ACTION="run-upgrade" + export KOLA_ID="run-upgrade" + export KOLA_EXTRA_ARGS=( + --upgrades + ) + run_kola + collect_kola_artifacts +fi diff --git a/tmt/tests/utils.sh b/tmt/tests/utils.sh new file mode 100755 index 0000000000..56ea4e06e3 --- /dev/null +++ b/tmt/tests/utils.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -eEuo pipefail +set -x + +export COREOS_ASSEMBLER_CONTAINER="$IMAGE_URL" +export COSA_DIR="$HOME/workspace/build" + +cosa () +{ + 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}" "$@"; +} +collect_kola_artifacts() { + mkdir -p "$TMT_TEST_DATA" + cd "${COSA_DIR}" && tar -C "${OUTPUT_DIR}" -c --xz "${KOLA_ID}" > "${KOLA_ID}-${TOKEN}.tar.xz" + cd "${COSA_DIR}" && mv "${KOLA_ID}-${TOKEN}.tar.xz" "${TMT_TEST_DATA}/${KOLA_ID}-${TOKEN}.tar.xz" +} +run_kola(){ + OUTPUT_DIR=$(cd "${COSA_DIR}" && cosa shell -- mktemp -d tmp/kola-XXXX) + TOKEN="$(uuidgen | cut -f1 -d -)" + KOLA_ID="${KOLA_ID:-kola}" + cd "${COSA_DIR}" && cosa kola "${KOLA_ACTION}" --build=latest --arch="$(arch)" --output-dir="${OUTPUT_DIR}/${KOLA_ID}" "${KOLA_EXTRA_ARGS[@]}" +} From 48c0022a4ad2769583c960a7e12d63ab6eee97e8 Mon Sep 17 00:00:00 2001 From: Roshan-R Date: Mon, 18 May 2026 15:35:28 +0530 Subject: [PATCH 3/3] tmt: add kola-self-tests plan for running self tests --- tmt/plans/main.fmf | 10 ++++++++++ tmt/tests/entrypoint.sh | 2 +- tmt/tests/kola.fmf | 6 ++++++ tmt/tests/test.sh | 13 +++++++++++++ 4 files changed, 30 insertions(+), 1 deletion(-) diff --git a/tmt/plans/main.fmf b/tmt/plans/main.fmf index 14abceb578..836ba3f2f5 100644 --- a/tmt/plans/main.fmf +++ b/tmt/plans/main.fmf @@ -34,6 +34,16 @@ execute: - build-qemu - test-qemu +/kola-self-tests: + summary: run self-tests + discover+: + how: fmf + test: + - init + - build-fcos + - build-qemu + - test-kola-self + /kola-test-upgrade: summary: run kola upgrade test discover+: diff --git a/tmt/tests/entrypoint.sh b/tmt/tests/entrypoint.sh index e86d1da63b..98e70d109f 100755 --- a/tmt/tests/entrypoint.sh +++ b/tmt/tests/entrypoint.sh @@ -9,7 +9,7 @@ case "$TEST_CASE" in "build-fcos"|"build-qemu") ./build.sh ;; - "test-qemu"|"test-kola-upgrade") + "test-qemu"|"test-kola-upgrade"|"test-kola-self") ./test.sh ;; *) diff --git a/tmt/tests/kola.fmf b/tmt/tests/kola.fmf index 01ed56f15a..054f25fa1d 100644 --- a/tmt/tests/kola.fmf +++ b/tmt/tests/kola.fmf @@ -29,3 +29,9 @@ test: ./entrypoint.sh order: 90 environment: TEST_CASE: test-kola-upgrade + +/test-kola-self: + duration: 1h + order: 100 + environment: + TEST_CASE: test-kola-self diff --git a/tmt/tests/test.sh b/tmt/tests/test.sh index 47bc8aaf4f..fc0649bc60 100755 --- a/tmt/tests/test.sh +++ b/tmt/tests/test.sh @@ -36,4 +36,17 @@ elif [ "$TEST_CASE" = "test-kola-upgrade" ]; then ) run_kola collect_kola_artifacts + +elif [ "$TEST_CASE" = "test-kola-self" ]; then + # self test + REPO_ROOT=$(cd ../.. && pwd) + cp -r "${REPO_ROOT}/tests/kola-ci-self" "${COSA_DIR}/kola-ci-self" + export KOLA_ACTION="run" + export KOLA_ID="kola-self" + export KOLA_EXTRA_ARGS=( + -E "/srv/kola-ci-self" + 'ext.kola-ci-self*' + ) + run_kola + collect_kola_artifacts fi