Skip to content

Commit a920e04

Browse files
authored
Merge pull request #87 from emqx/prepare-for-5.1-builder-images
chore: prepare for 5.1 builder image
2 parents 314dbfe + 3391a67 commit a920e04

File tree

6 files changed

+34
-28
lines changed

6 files changed

+34
-28
lines changed

.github/workflows/base.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
emqx_minor:
19+
base_image_vsn:
2020
- "5.0"
2121
platform:
2222
- [ubuntu22.04 , "linux/amd64,linux/arm64"]
@@ -53,7 +53,7 @@ jobs:
5353
- uses: docker/metadata-action@v4
5454
id: base_meta
5555
with:
56-
images: ghcr.io/${{ github.repository }}/base-${{ matrix.emqx_minor }}
56+
images: ghcr.io/${{ github.repository }}/base-${{ matrix.base_image_vsn }}
5757
tags: type=raw,value=${{ matrix.platform[0] }}
5858
- name: Build base image
5959
uses: docker/build-push-action@v3

.github/workflows/main.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
strategy:
3535
fail-fast: false
3636
matrix:
37-
emqx_minor:
37+
base_image_vsn:
3838
- "5.0"
3939
platform:
4040
- [ubuntu22.04 , "linux/amd64,linux/arm64"]
@@ -71,7 +71,7 @@ jobs:
7171
- uses: docker/metadata-action@v4
7272
id: base_meta
7373
with:
74-
images: ghcr.io/${{ github.repository }}/base-${{ matrix.emqx_minor }}
74+
images: ghcr.io/${{ github.repository }}/base-${{ matrix.base_image_vsn }}
7575
tags: type=raw,value=${{ matrix.platform[0] }}
7676
- name: Build base image
7777
uses: docker/build-push-action@v3
@@ -97,7 +97,7 @@ jobs:
9797
strategy:
9898
fail-fast: false
9999
matrix:
100-
emqx_minor:
100+
base_image_vsn:
101101
- "5.0"
102102
otp: ${{ fromJSON(needs.prepare.outputs.otp) }}
103103
elixir: ${{ fromJSON(needs.prepare.outputs.elixir) }}
@@ -144,7 +144,7 @@ jobs:
144144
tags: ${{ steps.meta.outputs.tags }}
145145
labels: ${{ steps.meta.outputs.labels }}
146146
build-args: |
147-
BUILD_FROM=ghcr.io/${{ github.repository }}/base-${{ matrix.emqx_minor }}:${{ matrix.platform[0] }}
147+
BUILD_FROM=ghcr.io/${{ github.repository }}/base-${{ matrix.base_image_vsn }}:${{ matrix.platform[0] }}
148148
OTP_VERSION=${{ matrix.otp }}
149149
ELIXIR_VERSION=${{ matrix.elixir }}
150150
file: ./Dockerfile

.github/workflows/test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
strategy:
3535
matrix:
36-
emqx_minor:
36+
base_image_vsn:
3737
- "5.0"
3838
otp: ${{ fromJSON(needs.prepare.outputs.otp) }}
3939
elixir: ${{ fromJSON(needs.prepare.outputs.elixir) }}
@@ -80,14 +80,14 @@ jobs:
8080
with:
8181
push: true
8282
platforms: ${{ matrix.platform[1] }}
83-
tags: localhost:5000/${{ github.repository }}/base-${{ matrix.emqx_minor }}:${{ matrix.platform[0] }}
83+
tags: localhost:5000/${{ github.repository }}/base-${{ matrix.base_image_vsn }}:${{ matrix.platform[0] }}
8484
file: ${{ matrix.platform[0] }}/Dockerfile
8585
context: .
8686
- uses: docker/build-push-action@v3
8787
with:
8888
platforms: ${{ matrix.platform[1] }}
8989
build-args: |
90-
BUILD_FROM=localhost:5000/${{ github.repository }}/base-${{ matrix.emqx_minor }}:${{ matrix.platform[0] }}
90+
BUILD_FROM=localhost:5000/${{ github.repository }}/base-${{ matrix.base_image_vsn }}:${{ matrix.platform[0] }}
9191
OTP_VERSION=${{ matrix.otp }}
9292
ELIXIR_VERSION=${{ matrix.elixir }}
9393
file: ./Dockerfile

README.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,17 @@
1-
NOTE: Must sync Dockerfile chages from main-4.4 branch!
2-
3-
# Docker images for EMQX Builder
1+
# Docker images for building EMQX v5 or later packages
42

53
This repo holds the Dockerfile and build scripts to build
64
docker images which are used to build EMQX.
75

86
The `main-4.4` branch is for EMQX 4.4 series.
9-
The `main` branch is for EMQX 5.0 series.
7+
The `main` branch is for EMQX 5.x series.
108

119
## OTP repo https://github.com/emqx/otp.git
1210

1311
EMQX uses a forked Erlang/OTP with the tag scheme `<UPSTREAM_TAG>-N`
1412
where `N` is the build number which includes bug fixes to Erlang/OTP source code.
1513
For example: `OTP-24.1.5-1`
1614

17-
## Add new OTP / Elixir versions to build
18-
19-
When we need to support a new OTP or Elixir version for a bugfix
20-
release, we should add a new OTP tag to the list in RELEASE.md
21-
22-
for example, after `5.0.0-otp24.1.5-1` is released, in case there is a
23-
bug found in OTP which requires OTP `24.2-1`, we should add `+
24-
OTP-24.2-1` to the list. For Elixir, once `1.13.2` is released, for
25-
example, it should be added as `+ Elixir-1.13.2` to the list.
26-
27-
This list should be append-only in case we want to rebuild an old EMQX tag,
28-
we can still find an up-to-date docker image for it.
29-
3015
## Image tag scheme
3116

3217
```

RELEASE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
New EMQX 5.0 Builder is Released
1+
New EMQX v5 Builder is Released
22

33
OTP versions from emqx/otp.git:
44

5-
+ OTP-24.3.4.2-3
65
+ OTP-25.3.2-1
76

87
Elixir versions from elixir-lang/elixir.git:

show-latest-images.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env bash
2+
3+
## This script prints out all the possible emqx-builder docker image tags built from the latest git tag
4+
5+
GREP='grep --color=never'
6+
ALL_SYS="$($GREP -A20 'platform:' .github/workflows/main.yaml | \
7+
$GREP -E '\-\s?\[.*\]$' | \
8+
tr -d '\- []"' | \
9+
sed -e '/^#.*/d' | \
10+
cut -d',' -f1 | \
11+
sort -u)"
12+
13+
GIT_TAG="$(git describe --abbrev=0 --tags)"
14+
OTP_VERSIONS="$($GREP -E "^\+\sOTP-.*" ./RELEASE.md | sed 's/\+\sOTP-//g')"
15+
ELIXIR_VERSIONS="$($GREP -E "^\+\sElixir-.*" ./RELEASE.md | sed 's/\+\sElixir-//g')"
16+
for elixir in $ELIXIR_VERSIONS; do
17+
for otp in $OTP_VERSIONS; do
18+
for sys in $ALL_SYS; do
19+
echo "ghcr.io/emqx/emqx-builder/${GIT_TAG}:${elixir}-${otp}-${sys}"
20+
done
21+
done
22+
done

0 commit comments

Comments
 (0)