diff --git a/.packit.yaml b/.packit.yaml index 76a8777d7..dc3e8b76d 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -15,6 +15,7 @@ jobs: - epel-7-ppc64le - epel-7-x86_64 - epel-8-x86_64 + - epel-9-x86_64 - fedora-all-aarch64 - fedora-all-x86_64 actions: @@ -34,6 +35,7 @@ jobs: - epel-7-ppc64le - epel-7-x86_64 - epel-8-x86_64 + - epel-9-x86_64 - fedora-all-aarch64 - fedora-all-x86_64 actions: diff --git a/Makefile b/Makefile index 265389612..dc6ba8fff 100644 --- a/Makefile +++ b/Makefile @@ -157,6 +157,9 @@ build_container: el8) \ _CONT_FILE="Containerfile.ubi8"; \ ;; \ + el9) \ + _CONT_FILE="Containerfile.ubi9"; \ + ;; \ f3[56]|rawhide) \ [ $$BUILD_CONTAINER = rawhide ] && VERSION=latest || VERSION=$${BUILD_CONTAINER: -2}; \ _CONT_FILE=".Containerfile.$${BUILD_CONTAINER}"; \ @@ -168,7 +171,7 @@ build_container: exit 1; \ ;; \ *) \ - echo "Available containers are el7, el8, f35, f36, rawhide"; \ + echo "Available containers are el7, el8, el9, f35, f36, rawhide"; \ exit 1; \ ;; \ esac && \ @@ -204,6 +207,7 @@ test: lint @ $(ENTER_VENV) \ pytest -vv --cov-report term-missing --cov=leapp tests/scripts +# TODO(pstodulk): create ticket to add rhel10 for testing.... py: 3.12 test_container: @case $(_TEST_CONTAINER) in \ rhel7) \ @@ -234,7 +238,7 @@ test_container_all: done clean_containers: - @for i in "leapp-build-"{el7,el8,f35,f36,rawhide} "leapp-tests-rhel"{7,8,9}; do \ + @for i in "leapp-build-"{el7,el8,el9,f35,f36,rawhide} "leapp-tests-rhel"{7,8,9}; do \ [ -z $$($(_CONTAINER_TOOL) images -q "$$i") ] || \ $(_CONTAINER_TOOL) rmi "$$i" > /dev/null 2>&1 || :; \ done diff --git a/res/container-builds/Containerfile.ubi9 b/res/container-builds/Containerfile.ubi9 new file mode 100644 index 000000000..0b2c02135 --- /dev/null +++ b/res/container-builds/Containerfile.ubi9 @@ -0,0 +1,12 @@ +FROM registry.access.redhat.com/ubi8/ubi:latest + +VOLUME /payload + +ENV DIST_VERSION 8 + +RUN dnf update -y && \ + dnf install -y python3 make git rpm-build python3-devel + #yum install -y python3-pip && \ python3 -m pip install --upgrade pip==20.3.4 + +WORKDIR /payload +ENTRYPOINT make build diff --git a/res/container-tests/Containerfile.ubi10 b/res/container-tests/Containerfile.ubi10 new file mode 100644 index 000000000..359d46b09 --- /dev/null +++ b/res/container-tests/Containerfile.ubi10 @@ -0,0 +1,35 @@ +FROM registry.access.redhat.com/ubi8/ubi:latest + +VOLUME /payload + +RUN yum update -y && \ + yum install python3 python39 python3-virtualenv make -y && \ + yum -y install python3-pip && \ + python3 -m pip install --upgrade pip==20.3.4 + +WORKDIR /payload +ENTRYPOINT virtualenv testenv -p "/usr/bin/$PYTHON_VENV" && \ + source testenv/bin/activate && \ + pip install -U setuptools && \ + pip install -U funcsigs && \ + pip install -U -r requirements-tests.txt && \ + pip install -U . && \ + export LINTABLES=$(find . -name '*.py' | grep -E -e '^\./leapp\/' -e '^\./tests/scripts/' | sort -u ) && \ + echo '==================================================' && \ + echo '==================================================' && \ + echo '=============== Running pylint ===============' && \ + echo '==================================================' && \ + echo '==================================================' && \ + echo $LINTABLES | xargs pylint && echo '===> pylint PASSED' && \ + echo '==================================================' && \ + echo '==================================================' && \ + echo '=============== Running flake8 ===============' && \ + echo '==================================================' && \ + echo '==================================================' && \ + flake8 $LINTABLES && echo '===> flake8 PASSED' && \ + echo '==================================================' && \ + echo '==================================================' && \ + echo '=============== Running tests ===============' && \ + echo '==================================================' && \ + echo '==================================================' && \ + py.test -vv --cov-report term-missing --cov=leapp tests/scripts/*.py