TMT: Install bats from source on RHEL

bats isn't shipped on ELN, RHEL and CentOS Stream. Enabling EPEL is also
problematic on internal testing farm environments.

This commit fetches and installs bats from source on RHEL and CentOS
Stream so we don't have to worry about EPEL enablement anymore.

We also aren't doing any ELN testing on TMT currently, so we don't need
any additional configuration for it and the current config should work
across the board.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:
Lokesh Mandvekar
2025-06-23 12:00:58 -04:00
parent 654c3fcc9c
commit bdc6d70f0e
2 changed files with 8 additions and 3 deletions

View File

@@ -6,8 +6,14 @@ prepare:
- when: distro == centos-stream or distro == rhel
how: shell
script: |
dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm --eval '%{?rhel}').noarch.rpm
dnf -y config-manager --set-enabled epel
# Install bats
# https://bats-core.readthedocs.io/en/stable/installation.html
BATS_VERSION=1.12.0
curl -L https://github.com/bats-core/bats-core/archive/refs/tags/v"$BATS_VERSION".tar.gz | tar -xz
pushd bats-core-"$BATS_VERSION"
./install.sh /usr
popd
rm -rf bats-core-"$BATS_VERSION"
order: 10
- when: initiator == packit
how: shell

View File

@@ -1,5 +1,4 @@
require:
- bats
- skopeo-tests
environment: