Skip to content

Commit b6a19b5

Browse files
authored
ci: use environment variable for goproxy (#179)
1 parent 50d0733 commit b6a19b5

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

dockerfiles/Dockerfile.dashboard.deb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ RUN /install-common.sh install_dashboard_dependencies_deb
1111

1212
ARG checkout_v="v2.3"
1313
ARG iteration="0"
14+
ARG goproxy="https://proxy.golang.com.cn,direct"
1415
ARG IMAGE_BASE
1516
ARG IMAGE_TAG
1617
ARG CODE_PATH

dockerfiles/Dockerfile.dashboard.rpm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ RUN /install-common.sh install_dashboard_dependencies_rpm
1111

1212
ARG checkout_v="v2.3"
1313
ARG iteration="0"
14+
ARG goproxy="https://proxy.golang.com.cn,direct"
1415
ARG IMAGE_BASE
1516
ARG IMAGE_TAG
1617
ARG CODE_PATH

utils/install-common.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ install_luarocks() {
6969
}
7070

7171
install_etcd() {
72-
wget https://github.com/etcd-io/etcd/releases/download/${RUNNING_ETCD_VERSION}/etcd-${RUNNING_ETCD_VERSION}-linux-amd64.tar.gz
72+
wget https://github.com/etcd-io/etcd/releases/download/"${RUNNING_ETCD_VERSION}"/etcd-"${RUNNING_ETCD_VERSION}"-linux-amd64.tar.gz
7373
tar -zxvf etcd-"${RUNNING_ETCD_VERSION}"-linux-amd64.tar.gz
7474
}
7575

@@ -94,8 +94,8 @@ install_apisix() {
9494
chown -R "$(whoami)":"$(whoami)" /tmp/build/output
9595
cd ..
9696
# copy the compiled files to the package install directory
97-
cp /tmp/build/output/apisix/usr/local/apisix/deps/lib64/luarocks/rocks-5.1/apisix/master-${iteration}/bin/apisix /tmp/build/output/apisix/usr/bin/ || true
98-
cp /tmp/build/output/apisix/usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/master-${iteration}/bin/apisix /tmp/build/output/apisix/usr/bin/ || true
97+
cp /tmp/build/output/apisix/usr/local/apisix/deps/lib64/luarocks/rocks-5.1/apisix/master-"${iteration}"/bin/apisix /tmp/build/output/apisix/usr/bin/ || true
98+
cp /tmp/build/output/apisix/usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/master-"${iteration}"/bin/apisix /tmp/build/output/apisix/usr/bin/ || true
9999
# modify the apisix entry shell to be compatible with version 2.2 and 2.3
100100
if is_newer_version "${checkout_v}"; then
101101
echo 'use shell '
@@ -113,7 +113,7 @@ install_apisix() {
113113
fi
114114
# delete unnecessary files
115115
rm -rf /tmp/build/output/apisix/usr/local/apisix/deps/lib64/luarocks
116-
rm -rf /tmp/build/output/apisix/usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/master-${iteration}/doc
116+
rm -rf /tmp/build/output/apisix/usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/master-"${iteration}"/doc
117117
}
118118

119119
install_golang() {
@@ -151,7 +151,7 @@ install_dashboard() {
151151
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
152152
cd "$HOME"
153153
mkdir gopath
154-
go env -w GOPROXY=https://goproxy.cn,direct
154+
go env -w GOPROXY="${goproxy}"
155155
cd /tmp/
156156
cd /apisix-dashboard
157157
make build

0 commit comments

Comments
 (0)