Skip to content

Commit 7ea90cc

Browse files
committed
ci: update passkey TMT plan for native CentOS Stream 10 execution
With 16GB RAM allocation, CentOS Stream 10 tests can now run directly on matching VM and containers. Thus, update the plan to take this into account and detect the distribution accordingly. Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com> Reviewed-by: Jakub Vávra <jvavra@redhat.com> Reviewed-by: Justin Stephenson <jstephen@redhat.com> (cherry picked from commit 943ecbb)
1 parent a312ffb commit 7ea90cc

2 files changed

Lines changed: 22 additions & 16 deletions

File tree

.packit.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,14 @@ jobs:
4545
- fedora-all
4646
- centos-stream-10
4747

48-
# Use fedora-latest as host for centos-10 tests due to memory constraints
49-
# that cause swapping issues with centos-10 containers on centos hosts
48+
# Run TMT tests after COPR builds complete
5049
- job: tests
5150
trigger: pull_request
52-
identifier: "centos-stream-10"
5351
packages:
5452
- upstream
5553
targets:
56-
- fedora-latest
57-
tf_extra_params:
58-
environments:
59-
- variables:
60-
CONTAINER_TARGET: "centos-10"
54+
- fedora-all
55+
- centos-stream-10
6156

6257
# Create Fedora pull request on release
6358
- job: propose_downstream

plans/passkey.fmf

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ provision:
1010
memory: ">= 16 GB"
1111

1212
prepare:
13+
- name: Enable EPEL repository for CentOS Stream
14+
how: shell
15+
script: |
16+
if grep -q "CentOS Stream" /etc/os-release 2>/dev/null; then
17+
dnf install -y epel-release
18+
fi
19+
1320
- name: Install general dependencies
1421
how: install
1522
package:
@@ -31,11 +38,13 @@ prepare:
3138
ln -sf $(command -v podman-compose) /usr/local/bin/docker-compose
3239
fi
3340

34-
- name: Install and load kernel module for passkey testing
41+
- name: Install and load kernel module for passkey testing on Fedora
3542
how: shell
3643
script: |
37-
dnf install -y kernel-modules-extra-$(uname -r)
38-
modprobe vhci_hcd
44+
if grep -q "^ID=fedora" /etc/os-release 2>/dev/null; then
45+
dnf install -y kernel-modules-extra-$(uname -r)
46+
modprobe vhci_hcd
47+
fi
3948

4049
- name: Clone sssd
4150
how: shell
@@ -76,11 +85,11 @@ prepare:
7685
setsebool container_manage_cgroup true
7786
cp env.example .env
7887

79-
# Use CONTAINER_TARGET from packit if provided, otherwise use Fedora
80-
if [ -n "$CONTAINER_TARGET" ]; then
81-
CONTAINER_TAG="$CONTAINER_TARGET"
88+
# Detect system distribution and set appropriate container tag
89+
. /tmp/sssd/contrib/ci/distro.sh
90+
if [ "$DISTRO_ID" = "centos" ]; then
91+
CONTAINER_TAG="centos-$DISTRO_RELEASE"
8292
else
83-
. /tmp/sssd/contrib/ci/distro.sh
8493
CONTAINER_TAG="fedora-$DISTRO_RELEASE"
8594
fi
8695
echo "Using container tag: $CONTAINER_TAG"
@@ -142,7 +151,9 @@ prepare:
142151

143152
echo "Using COPR repo: $COPR_REPO"
144153

145-
if [[ "$CONTAINER_TARGET" == "centos-10" ]]; then
154+
# Detect system distribution and set appropriate COPR command
155+
. /tmp/sssd/contrib/ci/distro.sh
156+
if [ "$DISTRO_ID" = "centos" ] && [ "$DISTRO_RELEASE" = "10" ]; then
146157
COPR_ENABLE_CMD="dnf copr enable -y $COPR_REPO centos-stream-10-x86_64"
147158
else
148159
COPR_ENABLE_CMD="dnf copr enable -y $COPR_REPO"

0 commit comments

Comments
 (0)