From ce62acaac8caf1a2782e6e3ae5bea4d6258d14f4 Mon Sep 17 00:00:00 2001 From: "guillaume.lambert" Date: Wed, 12 Jun 2024 11:46:18 +0200 Subject: [PATCH] Fix CI Cent OS 8 configuration issue (workaround) - reverts commit 94578ec62abf23679af8557bde48e26e1b7bc7d7 to reenable voting for checkbashisms and pre-commit Mirrorlist URLs have been archived and moved to Cent OS vault. https://forums.centos.org/viewtopic.php?t=78708&start=30 https://forums.centos.org/viewtopic.php?t=80698 This impacts Jenkins minions configuration. - force vault use in yum repos config till this is fixed upstream Change-Id: I87831c5fe4cb81031f75d42762e1ad16e296a3e5 Signed-off-by: guillaume.lambert --- tests/fixCIcentOS8reposMirrors.sh | 8 ++++++++ tox.ini | 17 +++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) create mode 100755 tests/fixCIcentOS8reposMirrors.sh diff --git a/tests/fixCIcentOS8reposMirrors.sh b/tests/fixCIcentOS8reposMirrors.sh new file mode 100755 index 000000000..74e097cfe --- /dev/null +++ b/tests/fixCIcentOS8reposMirrors.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +which yum || exit 0 +grep 'CentOS Stream release 8' /etc/redhat-release || exit 0 +#cat /etc/yum.repos.d/CentOS-Stream-AppStream.repo +sudo sed -i_ 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* || exit 1 +sudo sed -i_ 's@#baseurl=http://mirror.centos.org@baseurl=http://vault.centos.org@g' /etc/yum.repos.d/CentOS-* || exit 1 +#cat /etc/yum.repos.d/CentOS-Stream-AppStream.repo diff --git a/tox.ini b/tox.ini index b6bff05e0..e85022a14 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ [tox] minversion = 3.7.0 -envlist = buildcontroller +envlist = + buildcontroller  testsPCE sims121 build_karaf_tests121 @@ -327,12 +328,14 @@ allowlist_externals = sh checkbashisms sudo find + fixCIcentOS8reposMirrors.sh commands = - - sh -c 'command checkbashisms>/dev/null || sudo yum install -y devscripts-checkbashisms || sudo yum install -y devscripts-minimal || sudo yum install -y devscripts \ + ./fixCIcentOS8reposMirrors.sh + sh -c 'command checkbashisms>/dev/null || sudo yum install -y devscripts-checkbashisms || sudo yum install -y devscripts-minimal || sudo yum install -y devscripts \ || sudo yum install -y https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/31/Everything/x86_64/os/Packages/d/devscripts-checkbashisms-2.19.6-2.fc31.x86_64.rpm \ || (echo "checkbashisms command not found - please install it \ (e.g. sudo apt-get install devscripts | yum install devscripts-minimal )" >&2 && exit 1)' - - find . -not -path '*/\.*' -name *.sh -exec checkbashisms -f \{\} + + find . -not -path '*/\.*' -name *.sh -exec checkbashisms -f \{\} + [testenv:spelling] basepython = python3 @@ -407,12 +410,14 @@ allowlist_externals = sh cpan sudo which + fixCIcentOS8reposMirrors.sh commands = - - sh -c 'which cpan || sudo yum install -y perl-CPAN \ + ./fixCIcentOS8reposMirrors.sh + sh -c 'which cpan || sudo yum install -y perl-CPAN \ || (echo "cpan command not found - please install it \ (e.g. sudo apt-get install perl-modules | yum install perl-CPAN )" >&2 && exit 1)' - - pre-commit run --all-files --show-diff-on-failure - - pre-commit run gitlint-ci --hook-stage manual + pre-commit run --all-files --show-diff-on-failure + pre-commit run gitlint-ci --hook-stage manual [testenv:gitlint] basepython = python3 -- 2.36.6