From 7db21b7385ebfbc9d831646c8298d0f0d29c9915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hunor=20Csomort=C3=A1ni?= Date: Fri, 7 Jun 2019 12:48:58 +0200 Subject: [PATCH 1/4] Contributing: replace docker with podman MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Recommend using podman instead of docker because: * one can spin up containers without sudo with podman; * docker in Fedora has a really old version, and probably will be depercated at some point. Signed-off-by: Hunor Csomortáni --- docs/CONTRIBUTING.rst | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/CONTRIBUTING.rst b/docs/CONTRIBUTING.rst index 2da053c3..d9ea9a87 100644 --- a/docs/CONTRIBUTING.rst +++ b/docs/CONTRIBUTING.rst @@ -2,20 +2,19 @@ Running Tests ============= Since MBS requires Python dependencies that aren't available using PyPi (e.g. libsolv bindings), -there is a Docker image that can be used to run the code analysis and unit tests. +there is a container image that can be used to run the code analysis and unit tests. -To run the tests, you must first install and start Docker with:: +To run the tests, you must first install `podman` with:: - $ sudo dnf install docker - $ sudo systemctl start docker + $ sudo dnf install podman -From the main git directory, build the Docker image with:: +From the main git directory, build the container image with:: - $ sudo docker build -t mbs/test -f docker/Dockerfile-tests . + $ podman build -t mbs/test -f docker/Dockerfile-tests . Then run the tests with:: - $ sudo docker run -t --rm -v $PWD:/src:Z mbs/test + $ podman run -t --rm -v $PWD:/src:Z mbs/test Style Guide =========== From 9b90836595a3551194915addbbd76834566ac119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hunor=20Csomort=C3=A1ni?= Date: Fri, 7 Jun 2019 13:02:00 +0200 Subject: [PATCH 2/4] Document using images from Quay.io for testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hunor Csomortáni --- docs/CONTRIBUTING.rst | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/CONTRIBUTING.rst b/docs/CONTRIBUTING.rst index d9ea9a87..37b799ab 100644 --- a/docs/CONTRIBUTING.rst +++ b/docs/CONTRIBUTING.rst @@ -2,19 +2,27 @@ Running Tests ============= Since MBS requires Python dependencies that aren't available using PyPi (e.g. libsolv bindings), -there is a container image that can be used to run the code analysis and unit tests. +there are container images (based on CentOS and Fedora) that can be used to run the code analysis and unit tests. To run the tests, you must first install `podman` with:: $ sudo dnf install podman -From the main git directory, build the container image with:: +From the repo root, run the tests with:: - $ podman build -t mbs/test -f docker/Dockerfile-tests . + $ podman run -t --rm -v $PWD:/src:Z quay.io/factory2/mbs-test-centos -Then run the tests with:: +To run the tests with Python 3 use the image based on Fedora:: - $ podman run -t --rm -v $PWD:/src:Z mbs/test + $ podman run -t --rm -v $PWD:/src:Z quay.io/factory2/mbs-test-fedora + +If you need to build the container image locally use:: + + $ podman build -t mbs-test-centos -f docker/Dockerfile-tests . + +or:: + + $ podman build -t mbs-test-fedora -f docker/Dockerfile-tests-py3 . Style Guide =========== From e6640bb95b4461bc9a2cc027e4014e231b23b556 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hunor=20Csomort=C3=A1ni?= Date: Fri, 7 Jun 2019 17:58:38 +0200 Subject: [PATCH 3/4] Use images from Quay to run the tests on CentOS CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hunor Csomortáni --- .cico-pr.pipeline | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.cico-pr.pipeline b/.cico-pr.pipeline index 385ec258..8cef077d 100644 --- a/.cico-pr.pipeline +++ b/.cico-pr.pipeline @@ -58,15 +58,15 @@ node('factory2'){ } } - stage('Build Docker Images') { - onmyduffynode 'cd fm-orchestrator && docker build -t mbs/test -f docker/Dockerfile-tests .' - onmyduffynode 'cd fm-orchestrator && docker build -t mbs/test-py3 -f docker/Dockerfile-tests-py3 .' + stage('Pull Container Images') { + onmyduffynode 'docker pull quay.io/factory2/mbs-test-centos' + onmyduffynode 'docker pull quay.io/factory2/mbs-test-fedora' } stage('Run Test Suites') { timeout(20) { - onmyduffynode 'docker run -v ~/fm-orchestrator:/src:Z mbs/test' - onmyduffynode 'docker run -v ~/fm-orchestrator:/src:Z mbs/test-py3' + onmyduffynode 'docker run -v ~/fm-orchestrator:/src:Z quay.io/factory2/mbs-test-centos' + onmyduffynode 'docker run -v ~/fm-orchestrator:/src:Z quay.io/factory2/mbs-test-fedora' } } From 1848350e139a879503450bc575e01c68083ec2dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hunor=20Csomort=C3=A1ni?= Date: Mon, 10 Jun 2019 11:35:36 +0200 Subject: [PATCH 4/4] Document updating the test images in Quay.io MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hunor Csomortáni --- docs/CONTRIBUTING.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/CONTRIBUTING.rst b/docs/CONTRIBUTING.rst index 37b799ab..827400cb 100644 --- a/docs/CONTRIBUTING.rst +++ b/docs/CONTRIBUTING.rst @@ -180,3 +180,18 @@ Historical Names of Module Build Service - Rida - The Orchestrator + +Updating test images in Quay +============================ + +The Quay web UI can be used to update the images used for testing: + +* https://quay.io/repository/factory2/mbs-test-centos +* https://quay.io/repository/factory2/mbs-test-fedora + +Members of `the factory2 Quay organization `_ +can start a new build from the *Builds* page of the above repositories. +The `:latest` tags need to be applied to the new images on the *Tags* page +after the builds complete. + +We plan to automate the process above in the future.