From 1bc784beb927cef166f9d603d0936f90fb195015 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Luk=C3=A1=C5=A1=20Je=C5=BEek?= Date: Fri, 13 Mar 2020 11:54:01 +0100 Subject: [PATCH] CI: run all distributions on nightly branch --- .gitlab-ci.yml | 50 ++++++++++++++++++- .../packaging/leap/15.2/NOTSUPPORTED | 6 +++ .../graphite/packaging/leap/15.2/NOTSUPPORTED | 6 +++ tests/packaging/test_packaging.py | 16 +++--- 4 files changed, 69 insertions(+), 9 deletions(-) create mode 100644 modules/experimental_dot_auth/packaging/leap/15.2/NOTSUPPORTED create mode 100644 modules/graphite/packaging/leap/15.2/NOTSUPPORTED diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e2ddfb6d..dcff9cec8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -442,12 +442,58 @@ resperf:iter.udp-asan: variables: RESPERF_TEST: resperf.iter.udp -packaging: +.packagingtest: &packagingtest stage: extended + only: + refs: + - nightly@knot/knot-resolver + dependencies: [] tags: - dind + variables: + DISTRO: debian_10 script: - - pytest -r fEsxX tests/packaging + - pytest -r fEsxX tests/packaging -k $DISTRO + +packaging:debian_10: + <<: *packagingtest + variables: + DISTRO: debian_10 + +packaging:debian_9: + <<: *packagingtest + variables: + DISTRO: debian_9 + +packaging:ubuntu_18.04: + <<: *packagingtest + variables: + DISTRO: ubuntu_18.04 + +packaging:ubuntu_16.04: + <<: *packagingtest + variables: + DISTRO: ubuntu_16.04 + +packaging:centos_7: + <<: *packagingtest + variables: + DISTRO: centos_7 + +packaging:fedora_31: + <<: *packagingtest + variables: + DISTRO: fedora_31 + +packaging:fedora_30: + <<: *packagingtest + variables: + DISTRO: fedora_30 + +packaging:leap_15.2: + <<: *packagingtest + variables: + DISTRO: leap_15.2 # }}} diff --git a/modules/experimental_dot_auth/packaging/leap/15.2/NOTSUPPORTED b/modules/experimental_dot_auth/packaging/leap/15.2/NOTSUPPORTED new file mode 100644 index 000000000..682eff05a --- /dev/null +++ b/modules/experimental_dot_auth/packaging/leap/15.2/NOTSUPPORTED @@ -0,0 +1,6 @@ + +ERROR:test_packaging:Installing https://luarocks.org/basexx-0.4.1-1.rockspec +Error: Failed extracting v0.4.1.tar.gz + +Doesn't works on GitLab CI/CD, but works on localhost. +gzip and tar packages are installed, all packages has same version as packages on localhost's docker container. diff --git a/modules/graphite/packaging/leap/15.2/NOTSUPPORTED b/modules/graphite/packaging/leap/15.2/NOTSUPPORTED new file mode 100644 index 000000000..b1ae77d0a --- /dev/null +++ b/modules/graphite/packaging/leap/15.2/NOTSUPPORTED @@ -0,0 +1,6 @@ + +ERROR:test_packaging:Installing https://luarocks.org/cqueues-20190813.51-0.src.rock +164 Error: Failed extracting rel-20190813.tar.gz + +Doesn't works on GitLab CI/CD, but works on localhost. +gzip and tar packages are installed, all packages has same version as packages on localhost's docker container. diff --git a/tests/packaging/test_packaging.py b/tests/packaging/test_packaging.py index 1ede39676..3c97fbe5f 100644 --- a/tests/packaging/test_packaging.py +++ b/tests/packaging/test_packaging.py @@ -371,8 +371,8 @@ def buildenv(request, tmpdir_factory): from_image=img.build_id) yield img - client.images.remove(img.run_id) - client.images.remove(img.build_id) +# client.images.remove(img.run_id) +# client.images.remove(img.build_id) @pytest.mark.parametrize('module', MODULES) @@ -390,7 +390,7 @@ def test_collect(module, buildenv, tmp_path): distro_dir = os.path.join(module_dir, buildenv.distro, buildenv.version) if os.path.isfile(os.path.join(distro_dir, 'NOTSUPPORTED')): - pytest.skip('Unsupported linux distribution ({0} {1})'.format(buildenv.distro, buildenv.version)) + pytest.skip('Unsupported linux distribution ({0} {1}:{2})'.format(buildenv.distro, buildenv.version, module)) try: if module == 'daemon/packaging': @@ -430,7 +430,9 @@ def test_collect(module, buildenv, tmp_path): 'pre-run.sh'), '/root/kresd/') if os.path.isfile(os.path.join(distro_dir, 'rundeps')): - ch.exec_cmd(buildenv.cmd_pkgs_install() + ' '.join( + logger.debug(buildmod.cmd_pkgs_install() + ' '.join( + buildmod.readDependencies(os.path.join(distro_dir, 'rundeps')))) + ch.exec_cmd(buildmod.cmd_pkgs_install() + ' '.join( buildmod.readDependencies(os.path.join(distro_dir, 'rundeps'))), '/root/kresd/') @@ -469,8 +471,8 @@ def test_collect(module, buildenv, tmp_path): finally: ch.stop() ch.container.remove() - if buildmod is not None and buildmod is not buildenv: - client.images.remove(buildmod.run_id) - client.images.remove(buildmod.build_id) +# if buildmod is not None and buildmod is not buildenv: +# client.images.remove(buildmod.run_id) +# client.images.remove(buildmod.build_id) assert(rcode == 0) -- 2.47.2