Skip to content

Commit

Permalink
Starting initial draft commit for building for EL 9
Browse files Browse the repository at this point in the history
- this is mostly broken, just putting here some tips what
  we should update, etc...
  • Loading branch information
pirat89 committed Apr 2, 2024
1 parent 1c9e2ee commit a47fca6
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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}"; \
Expand All @@ -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 && \
Expand Down Expand Up @@ -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) \
Expand Down Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions res/container-builds/Containerfile.ubi9
Original file line number Diff line number Diff line change
@@ -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
35 changes: 35 additions & 0 deletions res/container-tests/Containerfile.ubi10
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a47fca6

Please sign in to comment.