From a40039178c84760f523edfc29b00572be5b388ce Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Apr 27 2020 10:30:27 +0000 Subject: Migrate the Fedora 29 container to Fedora 31 Signed-off-by: Pierre-Yves Chibon --- diff --git a/.cico.pipeline b/.cico.pipeline index 2e0b224..3dfb3d0 100644 --- a/.cico.pipeline +++ b/.cico.pipeline @@ -71,7 +71,7 @@ node('pagure') { throw e } finally { stage('Sync Artifacts'){ - syncfromduffynode('pagure/results_f29-rpms-py3/') + syncfromduffynode('pagure/results_f31-rpms-py3/') syncfromduffynode('pagure/results_centos7-rpms-py2/') syncfromduffynode('pagure/results_fedora-pip-py3/') } @@ -86,7 +86,7 @@ node('pagure') { } stage('Archive Artifacts'){ - archiveArtifacts artifacts: 'pagure/results_f29-rpms-py3/' + archiveArtifacts artifacts: 'pagure/results_f31-rpms-py3/' archiveArtifacts artifacts: 'pagure/results_centos7-rpms-py2/' archiveArtifacts artifacts: 'pagure/results_fedora-pip-py3/' } diff --git a/dev/containers/f29-rpms-py3 b/dev/containers/f29-rpms-py3 deleted file mode 100644 index 35baaed..0000000 --- a/dev/containers/f29-rpms-py3 +++ /dev/null @@ -1,37 +0,0 @@ -FROM fedora:29 - -ARG repo=https://pagure.io/pagure.git -ARG branch=master - -ENV REPO=$repo -ENV BRANCH=$branch - -RUN dnf -y --enablerepo=updates-testing install \ - python3-setuptools \ - python3-coverage \ - python3-nose \ - python3-mock \ - python3-docutils \ - python3-black \ - python3-flake8 \ - redis \ - which \ - git - -RUN cd / \ - && GIT_TRACE=1 GIT_CURL_VERBOSE=1 git clone -b $BRANCH $REPO \ - && chmod +x /pagure/dev/containers/runtests_py3.sh \ - && sed -i -e 's|\["alembic",|\["alembic-3",|' /pagure/tests/test_alembic.py - -# Install all the requirements from the spec file and replace the macro -# %{python_pkgversion} by '3' which thus installs all the py3 version of -# the dependencies. -RUN dnf install -y --enablerepo=updates-testing `grep "Requires:" /pagure/files/pagure.spec | \ - awk '{split($0, a, " "); print a[2]}' |grep -v "%{name}" | \ - sed -e "s|%{python_pkgversion}|3|"` && \ - dnf clean all && \ - cd /pagure && python setup.py build - -WORKDIR /pagure -ENTRYPOINT ["/pagure/dev/containers/runtests_py3.sh"] -CMD [] diff --git a/dev/containers/f31-rpms-py3 b/dev/containers/f31-rpms-py3 new file mode 100644 index 0000000..13be567 --- /dev/null +++ b/dev/containers/f31-rpms-py3 @@ -0,0 +1,38 @@ +FROM fedora:31 + +ARG repo=https://pagure.io/pagure.git +ARG branch=master + +ENV REPO=$repo +ENV BRANCH=$branch + +RUN dnf -y --enablerepo=updates-testing install \ + python3-setuptools \ + python3-coverage \ + python3-nose \ + python3-mock \ + python3-docutils \ + python3-black \ + python3-flake8 \ + redis \ + which \ + git + +RUN cd / \ + && GIT_TRACE=1 GIT_CURL_VERBOSE=1 git clone -b $BRANCH $REPO \ + && chmod +x /pagure/dev/containers/runtests_py3.sh \ + && sed -i -e 's|\["alembic",|\["alembic-3",|' /pagure/tests/test_alembic.py + +# Install all the requirements from the spec file and replace the macro +# %{python_pkgversion} by '3' which thus installs all the py3 version of +# the dependencies. +RUN sed -i "/Requires: python%{python_pkgversion}-enum34/d" /pagure/files/pagure.spec && \ + dnf install -y --enablerepo=updates-testing `grep "Requires:" /pagure/files/pagure.spec | \ + awk '{split($0, a, " "); print a[2]}' |grep -v "%{name}" | \ + sed -e "s|%{python_pkgversion}|3|"` && \ + dnf clean all && \ + cd /pagure && python setup.py build + +WORKDIR /pagure +ENTRYPOINT ["/pagure/dev/containers/runtests_py3.sh"] +CMD [] diff --git a/dev/run-tests-container.py b/dev/run-tests-container.py index 3531a83..02f5b6b 100755 --- a/dev/run-tests-container.py +++ b/dev/run-tests-container.py @@ -66,19 +66,19 @@ if __name__ == "__main__": container_names = ["pagure-c7-rpms-py2"] container_files = ["centos7-rpms-py2"] elif args.fedora is True: - container_names = ["pagure-f29-rpms-py3"] - container_files = ["f29-rpms-py3"] + container_names = ["pagure-f31-rpms-py3"] + container_files = ["f31-rpms-py3"] elif args.pip is True: container_names = ["pagure-fedora-pip-py3"] container_files = ["fedora-pip-py3"] else: container_names = [ - "pagure-f29-rpms-py3", + "pagure-f31-rpms-py3", "pagure-c7-rpms-py2", "pagure-fedora-pip-py3", ] container_files = [ - "f29-rpms-py3", + "f31-rpms-py3", "centos7-rpms-py2", "fedora-pip-py3", ] diff --git a/run_ci_tests_containers.sh b/run_ci_tests_containers.sh index 515f2e6..3bf8389 100644 --- a/run_ci_tests_containers.sh +++ b/run_ci_tests_containers.sh @@ -21,19 +21,19 @@ echo "Last commits:" git --no-pager log -2 fi -podman build --rm -t pagure-f29-rpms-py3 \ - -f dev/containers/f29-rpms-py3 \ +podman build --rm -t pagure-f31-rpms-py3 \ + -f dev/containers/f31-rpms-py3 \ dev/containers -if [ ! -d `pwd`/results_f29-rpms-py3 ]; then - mkdir `pwd`/results_f29-rpms-py3; +if [ ! -d `pwd`/results_f31-rpms-py3 ]; then + mkdir `pwd`/results_f31-rpms-py3; fi -podman run --rm -it --name pagure-f29-rpms-py3 \ - -v `pwd`/results_f29-rpms-py3:/pagure/results:z \ +podman run --rm -it --name pagure-f31-rpms-py3 \ + -v `pwd`/results_f31-rpms-py3:/pagure/results:z \ -e BRANCH=$BRANCH \ -e REPO=$REPO \ - pagure-f29-rpms-py3 + pagure-f31-rpms-py3 podman build --rm -t pagure-c7-rpms-py2 \