From 222a412cfbfae7f997954be5aacbfd1cff306869 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 16 Oct 2024 14:19:38 -0400 Subject: [PATCH] refactor --- .github/workflows/ci.yaml | 12 ++++++------ {linux-anvil-cos7 => linux-anvil}/Dockerfile | 2 +- {linux-anvil-cos7 => linux-anvil}/entrypoint_source | 0 .../centos7-aarch64-vault.repo | 0 .../centos7-ppc64le-vault.repo | 0 .../centos7-x86_64-vault.repo | 0 scripts/fix_rpm | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) rename {linux-anvil-cos7 => linux-anvil}/Dockerfile (98%) rename {linux-anvil-cos7 => linux-anvil}/entrypoint_source (100%) rename {centos7-repos => rpm-repos}/centos7-aarch64-vault.repo (100%) rename {centos7-repos => rpm-repos}/centos7-ppc64le-vault.repo (100%) rename {centos7-repos => rpm-repos}/centos7-x86_64-vault.repo (100%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a7e4b69f..40305d49 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,7 +18,7 @@ jobs: matrix: cfg: - DOCKERIMAGE: linux-anvil-cos7-x86_64 - DOCKERFILE: linux-anvil-cos7 + DOCKERFILE: linux-anvil DOCKERTAG: latest DISTRO_ARCH: "amd64" DISTRO_NAME: "centos" @@ -26,7 +26,7 @@ jobs: SHORT_DESCRIPTION: "conda-forge build image for Cent0S 7 on x86_64" - DOCKERIMAGE: linux-anvil-ppc64le - DOCKERFILE: linux-anvil-cos7 + DOCKERFILE: linux-anvil DOCKERTAG: latest DISTRO_ARCH: "ppc64le" DISTRO_NAME: "centos" @@ -34,7 +34,7 @@ jobs: SHORT_DESCRIPTION: "conda-forge build image for Cent0S 7 on ppc64le" - DOCKERIMAGE: linux-anvil-aarch64 - DOCKERFILE: linux-anvil-cos7 + DOCKERFILE: linux-anvil DOCKERTAG: latest DISTRO_ARCH: "arm64" DISTRO_NAME: "centos" @@ -69,7 +69,7 @@ jobs: SHORT_DESCRIPTION: "conda-forge build image for Cent0S 8 on aarch64 with CUDA" - DOCKERIMAGE: linux-anvil-alma-x86_64 - DOCKERFILE: linux-anvil-cos7 + DOCKERFILE: linux-anvil DOCKERTAG: "8" DISTRO_ARCH: "amd64" DISTRO_NAME: "almalinux" @@ -77,7 +77,7 @@ jobs: SHORT_DESCRIPTION: "conda-forge build image for Alma 8 on x86_64" - DOCKERIMAGE: linux-anvil-alma-aarch64 - DOCKERFILE: linux-anvil-cos7 + DOCKERFILE: linux-anvil DOCKERTAG: "8" DISTRO_ARCH: "arm64" DISTRO_NAME: "almalinux" @@ -85,7 +85,7 @@ jobs: SHORT_DESCRIPTION: "conda-forge build image for Alma 8 on aarch64" - DOCKERIMAGE: linux-anvil-alma-ppc64le - DOCKERFILE: linux-anvil-cos7 + DOCKERFILE: linux-anvil DOCKERTAG: "8" DISTRO_ARCH: "ppc64le" DISTRO_NAME: "almalinux" diff --git a/linux-anvil-cos7/Dockerfile b/linux-anvil/Dockerfile similarity index 98% rename from linux-anvil-cos7/Dockerfile rename to linux-anvil/Dockerfile index aeb057b6..92bfee2e 100644 --- a/linux-anvil-cos7/Dockerfile +++ b/linux-anvil/Dockerfile @@ -33,7 +33,7 @@ RUN if [ "${DISTRO_ARCH}" = "arm64" ] && [ "${DISTRO_NAME}${DISTRO_VER}" = "cent fi # Add the archived repo URL and fix RPM imports -ADD centos7-repos /tmp/centos7-repos +ADD rpm-repos /tmp/rpm-repos ADD scripts/fix_rpm /opt/docker/bin/fix_rpm RUN /opt/docker/bin/fix_rpm diff --git a/linux-anvil-cos7/entrypoint_source b/linux-anvil/entrypoint_source similarity index 100% rename from linux-anvil-cos7/entrypoint_source rename to linux-anvil/entrypoint_source diff --git a/centos7-repos/centos7-aarch64-vault.repo b/rpm-repos/centos7-aarch64-vault.repo similarity index 100% rename from centos7-repos/centos7-aarch64-vault.repo rename to rpm-repos/centos7-aarch64-vault.repo diff --git a/centos7-repos/centos7-ppc64le-vault.repo b/rpm-repos/centos7-ppc64le-vault.repo similarity index 100% rename from centos7-repos/centos7-ppc64le-vault.repo rename to rpm-repos/centos7-ppc64le-vault.repo diff --git a/centos7-repos/centos7-x86_64-vault.repo b/rpm-repos/centos7-x86_64-vault.repo similarity index 100% rename from centos7-repos/centos7-x86_64-vault.repo rename to rpm-repos/centos7-x86_64-vault.repo diff --git a/scripts/fix_rpm b/scripts/fix_rpm index 48ecab4d..d55f8805 100755 --- a/scripts/fix_rpm +++ b/scripts/fix_rpm @@ -5,7 +5,7 @@ set -exo pipefail if [[ "${DISTRO_NAME}${DISTRO_VER}" == "centos7" ]]; then # Disable outdated repos; use vault instead sed -i '/^enabled=/d; /^\[/a\enabled=0' /etc/yum.repos.d/CentOS-Base.repo - cp "/tmp/centos7-repos/centos7-$(uname -m)-vault.repo" /etc/yum.repos.d/vault.repo + cp "/tmp/rpm-repos/centos7-$(uname -m)-vault.repo" /etc/yum.repos.d/vault.repo # Resolves a nasty NOKEY warning that appears when using yum. rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 @@ -20,4 +20,4 @@ elif [ "${DISTRO_NAME}${DISTRO_VER}" = "almalinux8" ]; then rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux fi -rm -rf "/tmp/centos7-repos" +rm -rf "/tmp/rpm-repos"