Skip to content

Commit ddabcea

Browse files
authored
Merge pull request #72 from emqx/ubuntu-22.04-4.4
feat: add ubuntu22.04
2 parents bb4710a + 9b749dd commit ddabcea

File tree

6 files changed

+152
-19
lines changed

6 files changed

+152
-19
lines changed

.github/workflows/base.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ concurrency:
77
## Update the base image every day
88
on:
99
workflow_dispatch:
10-
pull_request:
1110
schedule:
1211
## In UTC
1312
- cron: '0 0 * * *'
@@ -21,8 +20,9 @@ jobs:
2120
fail-fast: false
2221
matrix:
2322
emqx_minor:
24-
- 4.4
23+
- "4.4"
2524
platform:
25+
- [ubuntu22.04 , "linux/amd64,linux/arm64"]
2626
- [ubuntu20.04 , "linux/amd64,linux/arm64"]
2727
- [ubuntu18.04 , "linux/amd64,linux/arm64"]
2828
- [ubuntu16.04 , "linux/amd64,linux/arm64"]
@@ -47,15 +47,12 @@ jobs:
4747
run: aws s3 sync s3://docker-buildx-cache/emqx-builder/${{ matrix.platform[0] }} /tmp/.docker-buildx-cache
4848
- uses: docker/setup-buildx-action@v2
4949
- uses: docker/setup-qemu-action@v2
50-
with:
51-
image: tonistiigi/binfmt:latest
52-
platforms: all
5350
- uses: docker/login-action@v2
5451
with:
5552
registry: ghcr.io
5653
username: ${{ github.actor }}
5754
password: ${{ github.token }}
58-
- uses: docker/metadata-action@v3
55+
- uses: docker/metadata-action@v4
5956
id: base_meta
6057
with:
6158
images: ghcr.io/${{ github.repository }}/base-${{ matrix.emqx_minor }}

.github/workflows/main.yaml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
outputs:
1717
otp: ${{ steps.otp.outputs.version }}
1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v3
2020
- name: get otp_version
2121
id: otp
2222
run: |
@@ -29,8 +29,9 @@ jobs:
2929
fail-fast: false
3030
matrix:
3131
emqx_minor:
32-
- 4.4
32+
- "4.4"
3333
platform:
34+
- [ubuntu22.04 , "linux/amd64,linux/arm64"]
3435
- [ubuntu20.04 , "linux/amd64,linux/arm64"]
3536
- [ubuntu18.04 , "linux/amd64,linux/arm64"]
3637
- [ubuntu16.04 , "linux/amd64,linux/arm64"]
@@ -55,15 +56,12 @@ jobs:
5556
run: aws s3 sync s3://docker-buildx-cache/emqx-builder/${{ matrix.platform[0] }} /tmp/.docker-buildx-cache
5657
- uses: docker/setup-buildx-action@v2
5758
- uses: docker/setup-qemu-action@v2
58-
with:
59-
image: tonistiigi/binfmt:latest
60-
platforms: all
6159
- uses: docker/login-action@v2
6260
with:
6361
registry: ghcr.io
6462
username: ${{ github.actor }}
6563
password: ${{ github.token }}
66-
- uses: docker/metadata-action@v3
64+
- uses: docker/metadata-action@v4
6765
id: base_meta
6866
with:
6967
images: ghcr.io/${{ github.repository }}/base-${{ matrix.emqx_minor }}
@@ -93,9 +91,10 @@ jobs:
9391
fail-fast: false
9492
matrix:
9593
emqx_minor:
96-
- 4.4
94+
- "4.4"
9795
otp: ${{ fromJSON(needs.prepare.outputs.otp) }}
9896
platform:
97+
- [ubuntu22.04 , "linux/amd64,linux/arm64"]
9998
- [ubuntu20.04 , "linux/amd64,linux/arm64"]
10099
- [ubuntu18.04 , "linux/amd64,linux/arm64"]
101100
- [ubuntu16.04 , "linux/amd64,linux/arm64"]
@@ -116,15 +115,12 @@ jobs:
116115
run: echo "ref=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
117116
- uses: docker/setup-buildx-action@v2
118117
- uses: docker/setup-qemu-action@v2
119-
with:
120-
image: tonistiigi/binfmt:latest
121-
platforms: all
122118
- uses: docker/login-action@v2
123119
with:
124120
registry: ghcr.io
125121
username: ${{ github.actor }}
126122
password: ${{ github.token }}
127-
- uses: docker/metadata-action@v3
123+
- uses: docker/metadata-action@v4
128124
id: meta
129125
with:
130126
images: ghcr.io/${{ github.repository }}/${{ steps.ref.outputs.ref }}

.github/workflows/test.yaml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Build docker images
2+
3+
concurrency:
4+
group: test-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
pull_request:
9+
10+
jobs:
11+
prepare:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
otp: ${{ steps.otp.outputs.version }}
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: get otp_version
18+
id: otp
19+
run: |
20+
otp_version=$(grep -E "^\+\sOTP-.*" ./RELEASE.md | sed 's/\+\sOTP-//g' | jq -R -s -c 'split("\n")[:-1]')
21+
echo "version=$otp_version" >> $GITHUB_OUTPUT
22+
23+
build:
24+
runs-on: ubuntu-latest
25+
needs:
26+
- prepare
27+
28+
strategy:
29+
matrix:
30+
emqx_minor:
31+
- "4.4"
32+
otp: ${{ fromJSON(needs.prepare.outputs.otp) }}
33+
platform:
34+
- [ubuntu22.04 , "linux/amd64,linux/arm64"]
35+
- [ubuntu20.04 , "linux/amd64,linux/arm64"]
36+
- [ubuntu18.04 , "linux/amd64,linux/arm64"]
37+
- [ubuntu16.04 , "linux/amd64,linux/arm64"]
38+
- [debian11 , "linux/amd64,linux/arm64"]
39+
- [debian10 , "linux/amd64,linux/arm64"]
40+
- [debian9 , "linux/amd64,linux/arm64"]
41+
- [el8 , "linux/amd64,linux/arm64"]
42+
- [el7 , "linux/amd64,linux/arm64"]
43+
- [amzn2 , "linux/amd64,linux/arm64"]
44+
- [alpine3.15.1, "linux/amd64,linux/arm64"]
45+
46+
services:
47+
registry:
48+
image: registry:2
49+
ports:
50+
- 5000:5000
51+
52+
steps:
53+
- uses: actions/checkout@v3
54+
- uses: docker/setup-qemu-action@v2
55+
- uses: docker/setup-buildx-action@v2
56+
with:
57+
driver-opts: network=host
58+
- name: Build base image
59+
uses: docker/build-push-action@v3
60+
with:
61+
push: true
62+
platforms: ${{ matrix.platform[1] }}
63+
tags: localhost:5000/${{ github.repository }}/base-${{ matrix.emqx_minor }}:${{ matrix.platform[0] }}
64+
file: ${{ matrix.platform[0] }}/Dockerfile
65+
context: .
66+
- uses: docker/build-push-action@v3
67+
with:
68+
platforms: ${{ matrix.platform[1] }}
69+
build-args: |
70+
BUILD_FROM=localhost:5000/${{ github.repository }}/base-${{ matrix.emqx_minor }}:${{ matrix.platform[0] }}
71+
OTP_VERSION=${{ matrix.otp }}
72+
file: ./Dockerfile
73+
context: .

RELEASE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ New EMQX Builder 4.4 Released
22

33
OTP versions for emqx/otp.git:
44

5-
+ OTP-23.3.4.18-1
65
+ OTP-24.3.4.2-1

get-otp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ erl -eval '{ok, Version} = file:read_file(filename:join([code:root_dir(), "relea
5151
# Get rebar3
5252
#########################
5353

54-
REBAR3_VERSION="${REBAR3_VERSION:-3.14.3-emqx-4}"
54+
REBAR3_VERSION="${REBAR3_VERSION:-3.18.0-emqx-1}"
5555

5656
cd /usr/local/bin
5757
DOWNLOAD_URL='https://github.com/emqx/rebar3/releases/download'

ubuntu22.04/Dockerfile

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
ARG BUILD_FROM=ubuntu:22.04
2+
FROM ${BUILD_FROM}
3+
4+
ENV DEBIAN_FRONTEND=noninteractive
5+
6+
RUN apt-get update && apt-get install -y \
7+
apt-transport-https \
8+
autoconf \
9+
automake \
10+
autotools-dev \
11+
bison \
12+
build-essential \
13+
ca-certificates \
14+
cmake \
15+
curl \
16+
debhelper \
17+
flex \
18+
g++ \
19+
gcc \
20+
git \
21+
inotify-tools \
22+
jq \
23+
libffi-dev \
24+
libkrb5-3 \
25+
libkrb5-dev \
26+
libncurses5-dev \
27+
libsasl2-2 \
28+
libsasl2-dev \
29+
libsasl2-modules-gssapi-mit \
30+
libssl-dev \
31+
libtool \
32+
make \
33+
python3 \
34+
python3-pip \
35+
software-properties-common \
36+
unzip \
37+
vim \
38+
wget \
39+
zip \
40+
zlib1g-dev
41+
42+
# The following is not necessary for Kerberos authentication but makes testing
43+
# https://github.com/kafka4beam/sasl_auth easier
44+
RUN apt-get install -y \
45+
krb5-kdc \
46+
krb5-admin-server \
47+
expect
48+
49+
RUN ln -sf /usr/bin/python3 /usr/bin/python
50+
RUN ln -sf /usr/bin/pip3 /usr/bin/pip
51+
52+
RUN cmake --version
53+
54+
RUN apt-get update && apt-get install -y unixodbc unixodbc-dev
55+
56+
WORKDIR /
57+
58+
59+
# cleanup
60+
RUN apt-get clean\
61+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
62+
63+
# Elixir complains if runs without UTF-8
64+
ENV LC_ALL=C.UTF-8
65+
ENV LANG=C.UTF-8
66+
67+
WORKDIR /
68+
CMD [ "/bin/bash" ]

0 commit comments

Comments
 (0)