File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 4949
5050 - name : Install rpm package
5151 run : |
52+ docker exec centos8Instance bash -c "sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*"
53+ docker exec centos8Instance bash -c "sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*"
54+ docker exec centos8Instance bash -c "dnf install -y centos-release-stream"
55+ docker exec centos8Instance bash -c "dnf swap -y centos-{linux,stream}-repos"
56+ docker exec centos8Instance bash -c "dnf distro-sync -y"
57+
5258 docker exec centos8Instance bash -c "yum install -y /apisix-dashboard/apisix-dashboard-${DASHBOARD_VERSION}-0.el8.x86_64.rpm"
5359 docker logs centos8Instance
5460 docker exec centos8Instance bash -c "cd /usr/local/apisix/dashboard/ && nohup ./manager-api &"
Original file line number Diff line number Diff line change 22set -euo pipefail
33set -x
44
5+ patch_centos8_repo () {
6+ if [[ $( rpm --eval ' %{centos_ver}' ) != " 8" ]]; then
7+ return
8+ fi
9+ # switch yum repo source
10+ sed -i ' s/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*
11+ sed -i ' s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*
12+
13+ # rebuild repo cache
14+ dnf install -y centos-release-stream
15+ dnf swap -y centos-{linux,stream}-repos
16+ dnf distro-sync -y
17+ }
18+
519install_apisix_dependencies_deb () {
620 install_dependencies_deb
721 install_openresty_deb
822 install_luarocks
923}
1024
1125install_apisix_dependencies_rpm () {
26+ patch_centos8_repo
27+
1228 install_dependencies_rpm
1329 install_openresty_rpm
1430 install_luarocks
1531}
1632
1733install_dependencies_rpm () {
34+ patch_centos8_repo
35+
1836 # install basic dependencies
1937 yum -y install wget tar gcc automake autoconf libtool make curl git which unzip sudo
2038 yum -y install epel-release
@@ -110,6 +128,8 @@ install_golang() {
110128}
111129
112130install_dashboard_dependencies_rpm () {
131+ patch_centos8_repo
132+
113133 yum install -y wget curl git which gcc make
114134 curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo
115135 sh -c " $( curl -fsSL https://rpm.nodesource.com/setup_14.x) "
You can’t perform that action at this time.
0 commit comments