Skip to content

Commit

Permalink
remove centos
Browse files Browse the repository at this point in the history
  • Loading branch information
BraisVQ committed Oct 10, 2024
1 parent a2ab9a7 commit 7204ff8
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 106 deletions.
10 changes: 3 additions & 7 deletions common/jenkins-agents/terraform-2306/docker/Dockerfile.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ENV INSTALL_PKGS="yum-utils gcc make git-core zlib zlib-devel gcc-c++ patch \
python3.11 python3.11-pip python3.11-setuptools \
readline \
libffi-devel libyaml-devel openssl-devel make bzip2 autoconf curl sqlite-devel xz"
ENV INSTALL_CENTOS_PKGS="readline-devel bison automake libtool"
ENV INSTALL_YUM_PKGS="readline-devel bison automake libtool"
ENV PATH=/opt/tfenv/bin:/opt/rbenv/shims:/opt/rbenv/bin:/opt/node/bin:$PATH
ENV HOME=/home/jenkins

Expand All @@ -46,16 +46,12 @@ COPY python_requirements /tmp/requirements.txt
# COPY certs/* /etc/pki/ca-trust/source/anchors/
# RUN update-ca-trust force-enable && update-ca-trust extract

COPY yum.repos.d/centos8.repo /etc/yum.repos.d/centos8.repo
RUN sed -i 's@^\s*enabled\s*=.*$@enabled = 1@g' /etc/yum.repos.d/*.repo \
&& sed -i 's@^\s*enabled\s*=.*$@enabled = 0@g' /etc/yum.repos.d/centos8.repo \
&& grep -i '\(name\|enabled\)' /etc/yum.repos.d/*.repo
COPY yum.repos.d/almalinux.repo /etc/yum.repos.d/almalinux.repo

RUN set -x \
&& dnf -y repolist \
&& dnf -y install $INSTALL_PKGS \
&& dnf -y install --enablerepo centos-base --enablerepo centos-plus --enablerepo centos-extras \
--enablerepo centos-appstream --enablerepo centos-devel $INSTALL_CENTOS_PKGS
&& dnf -y install --enablerepo almalinux-baseos --enablerepo almalinux-appstream $INSTALL_YUM_PKGS

RUN curl -sSL "https://bootstrap.pypa.io/pip/3.6/get-pip.py" -o "get-pip.py" \
&& python3 get-pip.py
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[almalinux-baseos]
name=AlmaLinux-8-BaseOS
baseurl=https://repo.almalinux.org/almalinux/8/BaseOS/x86_64/os/
enabled=0
gpgcheck=1
gpgkey=https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux

[almalinux-appstream]
name=AlmaLinux-8-AppStream
baseurl=https://repo.almalinux.org/almalinux/8/AppStream/x86_64/os/
enabled=0
gpgcheck=1
gpgkey=https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux

This file was deleted.

10 changes: 3 additions & 7 deletions common/jenkins-agents/terraform/docker/Dockerfile.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ENV INSTALL_PKGS="yum-utils gcc make git-core zlib zlib-devel gcc-c++ patch \
python39 python39-pip python39-setuptools \
readline \
libffi-devel openssl-devel make bzip2 autoconf curl sqlite-devel xz"
ENV INSTALL_CENTOS_PKGS="readline-devel bison automake libtool"
ENV INSTALL_YUM_PKGS="readline-devel bison automake libtool"
ENV PATH=/opt/tfenv/bin:/opt/rbenv/shims:/opt/rbenv/bin:/opt/node/bin:$PATH
ENV HOME=/home/jenkins

Expand All @@ -44,16 +44,12 @@ COPY python_requirements /tmp/requirements.txt
# COPY certs/* /etc/pki/ca-trust/source/anchors/
# RUN update-ca-trust force-enable && update-ca-trust extract

COPY yum.repos.d/centos8.repo /etc/yum.repos.d/centos8.repo
RUN sed -i 's@^\s*enabled\s*=.*$@enabled = 1@g' /etc/yum.repos.d/*.repo \
&& sed -i 's@^\s*enabled\s*=.*$@enabled = 0@g' /etc/yum.repos.d/centos8.repo \
&& grep -i '\(name\|enabled\)' /etc/yum.repos.d/*.repo
COPY yum.repos.d/almalinux.repo /etc/yum.repos.d/almalinux.repo

RUN set -x \
&& dnf -y repolist \
&& dnf -y install $INSTALL_PKGS \
&& dnf -y install --enablerepo centos-base --enablerepo centos-plus --enablerepo centos-extras \
--enablerepo centos-appstream --enablerepo centos-devel $INSTALL_CENTOS_PKGS
&& dnf -y install --enablerepo almalinux-baseos --enablerepo almalinux-appstream $INSTALL_YUM_PKGS

RUN curl -sSL "https://bootstrap.pypa.io/pip/3.6/get-pip.py" -o "get-pip.py" \
&& python3 get-pip.py
Expand Down
13 changes: 13 additions & 0 deletions common/jenkins-agents/terraform/docker/yum.repos.d/almalinux.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[almalinux-baseos]
name=AlmaLinux-8-BaseOS
baseurl=https://repo.almalinux.org/almalinux/8/BaseOS/x86_64/os/
enabled=0
gpgcheck=1
gpgkey=https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux

[almalinux-appstream]
name=AlmaLinux-8-AppStream
baseurl=https://repo.almalinux.org/almalinux/8/AppStream/x86_64/os/
enabled=0
gpgcheck=1
gpgkey=https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux
46 changes: 0 additions & 46 deletions common/jenkins-agents/terraform/docker/yum.repos.d/centos8.repo

This file was deleted.

0 comments on commit 7204ff8

Please sign in to comment.