Skip to content

Commit e60fd0e

Browse files
committed
chore: no quic on centos7 and raspbian9 for now
1 parent 03f6124 commit e60fd0e

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
ARG BUILD_FROM=ubuntu:20.04
22
FROM ${BUILD_FROM}
33

4+
ENV EMQX_BUILDER_IMAGE=${BUILD_FROM}
5+
46
ARG OTP_VERSION
57

68
COPY get-otp.sh /get-otp.sh
@@ -14,10 +16,9 @@ RUN /get-elixir.sh ${ELIXIR_VERSION}
1416
RUN mkdir /tools
1517

1618
ARG EMQTT_BENCH_REF
17-
ENV EMQTT_BENCH_REF=${EMQTT_BENCH_REF:-0.4.5-alpha.1}
1819

19-
RUN git clone --depth=1 --branch=${EMQTT_BENCH_REF} https://github.com/emqx/emqtt-bench.git /tools/emqtt-bench \
20-
&& make -C /tools/emqtt-bench
20+
COPY get-emqtt-bench.sh /get-emqtt-bench.sh
21+
RUN /get-emqtt-bench.sh "${EMQTT_BENCH_REF:-0.4.5-alpha.1}"
2122

2223
ENV PATH="/tools/emqtt-bench:$PATH"
2324

get-emqtt-bench.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env bash
2+
3+
set -xeuo pipefail
4+
5+
VSN="$1"
6+
7+
if grep -q -i 'rhel' /etc/os-release; then
8+
DIST='el'
9+
VERSION_ID="$(rpm --eval '%{rhel}')"
10+
else
11+
DIST="$(sed -n '/^ID=/p' /etc/os-release | sed -r 's/ID=(.*)/\1/g' | sed 's/"//g')"
12+
VERSION_ID="$(sed -n '/^VERSION_ID=/p' /etc/os-release | sed -r 's/VERSION_ID=(.*)/\1/g' | sed 's/"//g')"
13+
fi
14+
SYSTEM="$(echo "${DIST}${VERSION_ID}" | sed -r 's/([a-zA-Z]*)-.*/\1/g')"
15+
16+
# no quic on raspbian9 and centos7
17+
case "$SYSTEM" in
18+
*raspbian9*)
19+
export BUILD_WITHOUT_QUIC=1
20+
;;
21+
*el7*)
22+
export BUILD_WITHOUT_QUIC=1
23+
;;
24+
*)
25+
true
26+
;;
27+
esac
28+
29+
git clone --depth=1 --branch="${VSN}" https://github.com/emqx/emqtt-bench.git /tools/emqtt-bench
30+
make -C /tools/emqtt-bench

0 commit comments

Comments
 (0)