From ee0a6457a2d5a3a71a27e0cb46285b2329f45d22 Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Thu, 4 Jul 2024 09:53:09 +0200 Subject: [PATCH] fix(ci,test): fixed centos:7 related CI by using vault.centos.org. Signed-off-by: Federico Di Pierro --- .github/workflows/drivers_ci.yml | 24 ++++++++++++++++++- .../modern-falco-builder.Dockerfile | 17 +++++++++++-- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/.github/workflows/drivers_ci.yml b/.github/workflows/drivers_ci.yml index 6b67fd25e2..a722643f3a 100644 --- a/.github/workflows/drivers_ci.yml +++ b/.github/workflows/drivers_ci.yml @@ -275,6 +275,8 @@ jobs: retention-days: 1 build-scap-open-w-extern-bpf-skeleton: + env: + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true needs: [paths-filter,build-modern-bpf-skeleton] # See https://github.com/actions/runner/issues/409#issuecomment-1158849936 runs-on: ${{ (inputs.arch == 'aarch64' && 'actuated-arm64-8cpu-16gb') || 'ubuntu-latest' }} @@ -282,9 +284,29 @@ jobs: container: centos:7 steps: # Always install deps before invoking checkout action, to properly perform a full clone. - - name: Install build dependencies + - name: Fix mirrors to use vault.centos.org + run: | + sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo + sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo + sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo + + - name: Install scl repos run: | yum -y install centos-release-scl + + - name: Fix new mirrors to use vault.centos.org + run: | + sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo + sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo + sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo + + - name: Fix arm64 scl repos to use correct mirror + if: inputs.arch == 'aarch64' + run: | + sed -i 's/vault.centos.org\/centos/vault.centos.org\/altarch/g' /etc/yum.repos.d/CentOS-SCLo-scl*.repo + + - name: Install build dependencies + run: | yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ source /opt/rh/devtoolset-9/enable yum install -y wget git make m4 rpm-build perl-IPC-Cmd diff --git a/test/vm/containers/modern-falco-builder.Dockerfile b/test/vm/containers/modern-falco-builder.Dockerfile index 0acdda2f0c..cded8cc3fe 100644 --- a/test/vm/containers/modern-falco-builder.Dockerfile +++ b/test/vm/containers/modern-falco-builder.Dockerfile @@ -1,7 +1,20 @@ FROM centos:7 -RUN yum -y install centos-release-scl; \ - yum -y install devtoolset-9-gcc \ +# fix broken mirrors +RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo; \ + sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo; \ + sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo + +RUN yum -y install centos-release-scl + +# fix broken mirrors (again) +RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo; \ + sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo; \ + sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo + +RUN [ $(uname -m) == 'aarch64' ] && sed -i 's/vault.centos.org\/centos/vault.centos.org\/altarch/g' /etc/yum.repos.d/CentOS-SCLo-scl*.repo + +RUN yum -y install devtoolset-9-gcc \ devtoolset-9-gcc-c++; \ source scl_source enable devtoolset-9; \ yum -y install git \