Skip to content

Commit 25c106a

Browse files
chore: remove support for centos (#394)
1 parent 92d40eb commit 25c106a

11 files changed

+20
-182
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ jobs:
7373
source .requirements
7474
7575
# build apisix
76-
make package type=rpm app=apisix openresty=apisix-runtime runtime_version=${APISIX_RUNTIME} checkout=${APISIX_TAG_VERSION} version=${APISIX_TAG_VERSION} image_base=centos image_tag=7
77-
make package type=rpm app=apisix openresty=apisix-runtime runtime_version=${APISIX_RUNTIME} checkout=${APISIX_TAG_VERSION} version=${APISIX_TAG_VERSION} image_base=centos image_tag=8
7876
make package type=rpm app=apisix openresty=apisix-runtime runtime_version=${APISIX_RUNTIME} checkout=${APISIX_TAG_VERSION} version=${APISIX_TAG_VERSION} image_base=registry.access.redhat.com/ubi8/ubi image_tag=8.6
7977
mv ./output/apisix-${APISIX_TAG_VERSION}-0.{el7,el8,ubi8.6}.${ARCH}.rpm ${VAR_RPM_WORKBENCH_DIR}
8078
echo "TARGET_APP=apisix" >> "$GITHUB_ENV"
@@ -86,8 +84,6 @@ jobs:
8684
run: |
8785
# build apisix-base
8886
echo ${{ env.TAG_TYPE }} ${{ env.TAG_VERSION }}
89-
make package type=rpm app=apisix-base checkout=${APISIX_BASE_TAG_VERSION} version=${APISIX_BASE_TAG_VERSION} image_base=centos image_tag=7
90-
make package type=rpm app=apisix-base checkout=${APISIX_BASE_TAG_VERSION} version=${APISIX_BASE_TAG_VERSION} image_base=centos image_tag=8
9187
make package type=rpm app=apisix-base checkout=${APISIX_BASE_TAG_VERSION} version=${APISIX_BASE_TAG_VERSION} image_base=registry.access.redhat.com/ubi8/ubi image_tag=8.6
9288
mv ./output/apisix-base-${APISIX_BASE_TAG_VERSION}-0.{el7,el8,ubi8.6}.${ARCH}.rpm ${VAR_RPM_WORKBENCH_DIR}
9389
echo "TARGET_APP=apisix-base" >> "$GITHUB_ENV"
@@ -99,8 +95,6 @@ jobs:
9995
run: |
10096
# build apisix-runtime
10197
echo ${{ env.TAG_TYPE }} ${{ env.TAG_VERSION }}
102-
make package type=rpm app=apisix-runtime checkout=${APISIX_RUNTIME_TAG_VERSION} version=${APISIX_RUNTIME_TAG_VERSION} image_base=centos image_tag=7
103-
make package type=rpm app=apisix-runtime checkout=${APISIX_RUNTIME_TAG_VERSION} version=${APISIX_RUNTIME_TAG_VERSION} image_base=centos image_tag=8
10498
make package type=rpm app=apisix-runtime checkout=${APISIX_RUNTIME_TAG_VERSION} version=${APISIX_RUNTIME_TAG_VERSION} image_base=registry.access.redhat.com/ubi8/ubi image_tag=8.6
10599
mv ./output/apisix-runtime-${APISIX_RUNTIME_TAG_VERSION}-0.{el7,el8,ubi8.6}.${ARCH}.rpm ${VAR_RPM_WORKBENCH_DIR}
106100
echo "TARGET_APP=apisix-runtime" >> "$GITHUB_ENV"
@@ -111,8 +105,6 @@ jobs:
111105
APISIX_DASHBOARD_TAG_VERSION: ${{ env.TAG_VERSION }}
112106
run: |
113107
# build apisix dashboard
114-
make package type=rpm app=dashboard checkout=${APISIX_DASHBOARD_TAG_VERSION} version=${APISIX_DASHBOARD_TAG_VERSION} image_base=centos image_tag=7
115-
make package type=rpm app=dashboard checkout=${APISIX_DASHBOARD_TAG_VERSION} version=${APISIX_DASHBOARD_TAG_VERSION} image_base=centos image_tag=8
116108
mv ./output/apisix-dashboard-${APISIX_DASHBOARD_TAG_VERSION}-0.el{7,8}.${ARCH}.rpm ${VAR_RPM_WORKBENCH_DIR}
117109
echo "TARGET_APP=apisix-dashboard" >> "$GITHUB_ENV"
118110
@@ -130,15 +122,6 @@ jobs:
130122
name: "${{ env.PACKAGE_NAME }}"
131123
path: "${{ env.VAR_RPM_WORKBENCH_DIR }}/${{ env.PACKAGE_NAME }}"
132124

133-
- name: Upload apisix Artifact for Centos
134-
if: ${{ env.TAG_TYPE == 'apisix' }}
135-
uses: actions/[email protected]
136-
env:
137-
PACKAGE_NAME: apisix-${{ env.TAG_VERSION }}-0.el7.${{ env.ARCH }}.rpm
138-
with:
139-
name: "${{ env.PACKAGE_NAME }}"
140-
path: "${{ env.VAR_RPM_WORKBENCH_DIR }}/${{ env.PACKAGE_NAME }}"
141-
142125
- name: Upload apisix-base Artifact for Redhat
143126
if: ${{ env.TAG_TYPE == 'apisix-base' }}
144127
uses: actions/[email protected]
@@ -148,15 +131,6 @@ jobs:
148131
name: "${{ env.PACKAGE_NAME }}"
149132
path: "${{ env.VAR_RPM_WORKBENCH_DIR }}/${{ env.PACKAGE_NAME }}"
150133

151-
- name: Upload apisix-base Artifact for Centos
152-
if: ${{ env.TAG_TYPE == 'apisix-base' }}
153-
uses: actions/[email protected]
154-
env:
155-
PACKAGE_NAME: apisix-base-${{ env.TAG_VERSION }}-0.el7.${{ env.ARCH }}.rpm
156-
with:
157-
name: "${{ env.PACKAGE_NAME }}"
158-
path: "${{ env.VAR_RPM_WORKBENCH_DIR }}/${{ env.PACKAGE_NAME }}"
159-
160134
- name: Upload apisix-runtime Artifact for Redhat
161135
if: ${{ env.TAG_TYPE == 'apisix-runtime' }}
162136
uses: actions/[email protected]
@@ -166,15 +140,6 @@ jobs:
166140
name: "${{ env.PACKAGE_NAME }}"
167141
path: "${{ env.VAR_RPM_WORKBENCH_DIR }}/${{ env.PACKAGE_NAME }}"
168142

169-
- name: Upload apisix-runtime Artifact for Centos
170-
if: ${{ env.TAG_TYPE == 'apisix-runtime' }}
171-
uses: actions/[email protected]
172-
env:
173-
PACKAGE_NAME: apisix-runtime-${{ env.TAG_VERSION }}-0.el7.${{ env.ARCH }}.rpm
174-
with:
175-
name: "${{ env.PACKAGE_NAME }}"
176-
path: "${{ env.VAR_RPM_WORKBENCH_DIR }}/${{ env.PACKAGE_NAME }}"
177-
178143
- name: Upload apisix-dashboard Artifact
179144
if: ${{ env.TAG_TYPE == 'dashboard' }}
180145
uses: actions/[email protected]
@@ -192,7 +157,7 @@ jobs:
192157
sudo pip install coscmd
193158
sudo -E ./utils/publish-rpm.sh init_cos_utils
194159
195-
- name: RPM repo init for centos and redhat
160+
- name: RPM repo init for redhat
196161
run: |
197162
sudo -E ./utils/publish-rpm.sh repo_init
198163
sudo -E ./utils/publish-rpm.sh repo_clone
@@ -208,15 +173,15 @@ jobs:
208173
sudo -E ./utils/publish-rpm.sh rpm_gpg_sign
209174
sudo -E ./utils/publish-rpm.sh repo_package_sync
210175
211-
- name: RPM repo backup for centos and redhat
176+
- name: RPM repo backup for redhat
212177
run: |
213178
sudo -E ./utils/publish-rpm.sh repo_backup
214179
215-
- name: RPM repo refresh for centos and redhat
180+
- name: RPM repo refresh for redhat
216181
run: |
217182
sudo -E ./utils/publish-rpm.sh repo_repodata_rebuild
218183
sudo -E ./utils/publish-rpm.sh repo_upload
219184
220-
- name: RPM repo publish for centos and redhat
185+
- name: RPM repo publish for redhat
221186
run: |
222187
sudo -E ./utils/publish-rpm.sh repo_publish

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ version=0
1919
checkout=0
2020
app=0
2121
type=0
22-
image_base="centos"
23-
image_tag="7"
22+
image_base="registry.access.redhat.com/ubi8/ubi"
23+
image_tag="8.6"
2424
iteration=0
2525
local_code_path=0
2626
openresty="apisix-runtime"

build-apisix-base-debug-centos7.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

build-apisix-runtime-debug-centos7.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

dockerfiles/Dockerfile.apisix-base.rpm

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
1-
ARG IMAGE_BASE="centos"
2-
ARG IMAGE_TAG="7"
1+
ARG IMAGE_BASE="registry.access.redhat.com/ubi8/ubi"
2+
ARG IMAGE_TAG="8.6"
33

44
FROM ${IMAGE_BASE}:${IMAGE_TAG}
55

6-
# Note: The duplication around the rpm series dockerfile here
7-
# is used for reuse the container layer cache
8-
RUN if [[ $(rpm --eval '%{centos_ver}') == "8" ]]; then \
9-
sed -re "s/^#?\s*(mirrorlist)/#\1/g" \
10-
-e "s|^#?\s*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" \
11-
-i /etc/yum.repos.d/CentOS-Linux-*; \
12-
dnf install -y centos-release-stream; \
13-
dnf swap -y centos-{linux,stream}-repos; \
14-
dnf distro-sync -y; \
15-
fi
166

177
COPY ./utils/build-common.sh /tmp/build-common.sh
188
COPY build-apisix-base.sh /tmp/build-apisix-base.sh

dockerfiles/Dockerfile.apisix-runtime.rpm

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
1-
ARG IMAGE_BASE="centos"
2-
ARG IMAGE_TAG="7"
1+
ARG IMAGE_BASE="registry.access.redhat.com/ubi8/ubi"
2+
ARG IMAGE_TAG="8.6"
33

44
FROM ${IMAGE_BASE}:${IMAGE_TAG}
55

6-
# Note: The duplication around the rpm series dockerfile here
7-
# is used for reuse the container layer cache
8-
RUN if [[ $(rpm --eval '%{centos_ver}') == "8" ]]; then \
9-
sed -re "s/^#?\s*(mirrorlist)/#\1/g" \
10-
-e "s|^#?\s*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" \
11-
-i /etc/yum.repos.d/CentOS-Linux-*; \
12-
dnf install -y centos-release-stream; \
13-
dnf swap -y centos-{linux,stream}-repos; \
14-
dnf distro-sync -y; \
15-
fi
16-
17-
186
WORKDIR /tmp
197

208
ARG VERSION

dockerfiles/Dockerfile.apisix.rpm

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
1-
ARG IMAGE_BASE="centos"
2-
ARG IMAGE_TAG="7"
1+
ARG IMAGE_BASE="registry.access.redhat.com/ubi8/ubi"
2+
ARG IMAGE_TAG="8.6"
3+
34
ARG PACKAGE_TYPE
45
ARG RUNTIME_VERSION
56

67
FROM apache/apisix-runtime-${PACKAGE_TYPE}:${RUNTIME_VERSION} AS APISIX-RUNTIME
78
FROM ${IMAGE_BASE}:${IMAGE_TAG}
89

9-
# Note: The duplication around the rpm series dockerfile here
10-
# is used for reuse the container layer cache
11-
RUN if [[ $(rpm --eval '%{centos_ver}') == "8" ]]; then \
12-
sed -re "s/^#?\s*(mirrorlist)/#\1/g" \
13-
-e "s|^#?\s*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" \
14-
-i /etc/yum.repos.d/CentOS-Linux-*; \
15-
dnf install -y centos-release-stream; \
16-
dnf swap -y centos-{linux,stream}-repos; \
17-
dnf distro-sync -y; \
18-
fi
19-
2010
COPY ./utils/install-common.sh /install-common.sh
2111
COPY ./utils/determine-dist.sh /determine-dist.sh
2212
COPY --from=APISIX-RUNTIME /usr/local/openresty /usr/local/openresty

dockerfiles/Dockerfile.dashboard.rpm

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
1-
ARG IMAGE_BASE="centos"
2-
ARG IMAGE_TAG="7"
1+
ARG IMAGE_BASE="registry.access.redhat.com/ubi8/ubi"
2+
ARG IMAGE_TAG="8.6"
33

44
FROM ${IMAGE_BASE}:${IMAGE_TAG}
55

6-
# Note: The duplication around the rpm series dockerfile here
7-
# is used for reuse the container layer cache
8-
RUN if [[ $(rpm --eval '%{centos_ver}') == "8" ]]; then \
9-
sed -re "s/^#?\s*(mirrorlist)/#\1/g" \
10-
-e "s|^#?\s*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" \
11-
-i /etc/yum.repos.d/CentOS-Linux-*; \
12-
dnf install -y centos-release-stream; \
13-
dnf swap -y centos-{linux,stream}-repos; \
14-
dnf distro-sync -y; \
15-
fi
16-
176
COPY ./utils/install-common.sh /install-common.sh
187
COPY ./utils/determine-dist.sh /determine-dist.sh
198

utils/build-common.sh

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,8 @@ ARCH=${ARCH:-`(uname -m | tr '[:upper:]' '[:lower:]')`}
66
BUILD_PATH=${BUILD_PATH:-`pwd`}
77

88
build_apisix_base_rpm() {
9-
if [[ $(rpm --eval '%{centos_ver}') == "7" ]]; then
10-
yum -y install centos-release-scl
11-
yum -y install devtoolset-9 patch wget git make sudo
12-
set +eu
13-
source scl_source enable devtoolset-9
14-
set -eu
15-
elif [[ $(rpm --eval '%{centos_ver}') == "8" ]]; then
16-
dnf install -y gcc-toolset-9-toolchain patch wget git make sudo
17-
dnf install -y yum-utils
18-
set +eu
19-
source /opt/rh/gcc-toolset-9/enable
20-
set -eu
21-
else
22-
dnf install -y yum-utils
23-
yum -y install --disablerepo=* --enablerepo=ubi-8-appstream-rpms --enablerepo=ubi-8-baseos-rpms gcc gcc-c++ patch wget git make sudo xz
24-
fi
9+
dnf install -y yum-utils
10+
yum -y install --disablerepo=* --enablerepo=ubi-8-appstream-rpms --enablerepo=ubi-8-baseos-rpms gcc gcc-c++ patch wget git make sudo xz
2511

2612
command -v gcc
2713
gcc --version
@@ -69,22 +55,8 @@ build_apisix_base_apk() {
6955
}
7056

7157
build_apisix_runtime_rpm() {
72-
if [[ $(rpm --eval '%{centos_ver}') == "7" ]]; then
73-
yum -y install centos-release-scl
74-
yum -y install devtoolset-9 patch wget git make sudo cpanminus
75-
set +eu
76-
source scl_source enable devtoolset-9
77-
set -eu
78-
elif [[ $(rpm --eval '%{centos_ver}') == "8" ]]; then
79-
dnf install -y gcc-toolset-9-toolchain patch wget git make sudo cpanminus
80-
dnf install -y yum-utils
81-
set +eu
82-
source /opt/rh/gcc-toolset-9/enable
83-
set -eu
84-
else
85-
dnf install -y yum-utils
86-
yum -y install --disablerepo=* --enablerepo=ubi-8-appstream-rpms --enablerepo=ubi-8-baseos-rpms gcc gcc-c++ patch wget git make sudo xz cpanminus
87-
fi
58+
dnf install -y yum-utils
59+
yum -y install --disablerepo=* --enablerepo=ubi-8-appstream-rpms --enablerepo=ubi-8-baseos-rpms gcc gcc-c++ patch wget git make sudo xz cpanminus
8860

8961
command -v gcc
9062
gcc --version

utils/determine-dist.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
set -euo pipefail
33
set -x
44

5-
dist="el7"
6-
if [ "${IMAGE_BASE}" == "centos" ]
7-
then
8-
dist="el${IMAGE_TAG}"
9-
elif [ "${IMAGE_BASE}" == "ubuntu" ]
5+
if [ "${IMAGE_BASE}" == "ubuntu" ]
106
then
117
dist="${IMAGE_BASE}${IMAGE_TAG}"
128
elif [ "${IMAGE_BASE}" == "debian" ]

0 commit comments

Comments
 (0)