ci: include OTP-25 in some workflows

* Use OTP-25 exclusively for Elixir builds
* Include OTP-25 in slim package builds
* Include OTP-25 in test workflow matrices
This commit is contained in:
Andrew Mayorov 2022-12-08 14:21:52 +03:00
parent 202d2b07ff
commit 2e1cdd039e
No known key found for this signature in database
GPG Key ID: 2837C62ACFBFED5D
25 changed files with 127 additions and 110 deletions

View File

@ -2,7 +2,7 @@
define usage define usage
make -f .ci/docker-compose-file/Makefile.local up make -f .ci/docker-compose-file/Makefile.local up
make -f .ci/docker-compose-file/Makefile.local ct CONTAINER=erlang24 SUITE=apps/emqx_authn/test/emqx_authn_mnesia_SUITE.erl make -f .ci/docker-compose-file/Makefile.local ct CONTAINER=erlang SUITE=apps/emqx_authn/test/emqx_authn_mnesia_SUITE.erl
make -f .ci/docker-compose-file/Makefile.local down make -f .ci/docker-compose-file/Makefile.local down
endef endef
export usage export usage

View File

@ -19,7 +19,7 @@ services:
command: /bin/generate-certs.sh command: /bin/generate-certs.sh
kdc: kdc:
hostname: kdc.emqx.net hostname: kdc.emqx.net
image: ghcr.io/emqx/emqx-builder/5.0-17:1.13.4-24.2.1-1-ubuntu20.04 image: ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-24.3.4.2-1-ubuntu20.04
container_name: kdc.emqx.net container_name: kdc.emqx.net
networks: networks:
emqx_bridge: emqx_bridge:

View File

@ -1,9 +1,9 @@
version: '3.9' version: '3.9'
services: services:
erlang24: erlang:
container_name: erlang24 container_name: erlang
image: ghcr.io/emqx/emqx-builder/5.0-17:1.13.4-24.2.1-1-ubuntu20.04 image: ${DOCKER_CT_RUNNER_IMAGE:-ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-24.3.4.2-1-ubuntu20.04}
env_file: env_file:
- conf.env - conf.env
environment: environment:

View File

@ -3,7 +3,7 @@ inputs:
profile: # emqx, emqx-enterprise profile: # emqx, emqx-enterprise
required: true required: true
type: string type: string
otp: # 24.2.1-1, 23.3.4.9-3 otp: # 25.1.2-2, 24.3.4.2-1
required: true required: true
type: string type: string
os: os:

View File

@ -23,7 +23,7 @@ jobs:
prepare: prepare:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
# prepare source with any OTP version, no need for a matrix # prepare source with any OTP version, no need for a matrix
container: "ghcr.io/emqx/emqx-builder/5.0-24:1.13.4-24.3.4.2-1-ubuntu20.04" container: "ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-24.3.4.2-1-ubuntu20.04"
outputs: outputs:
BUILD_PROFILE: ${{ steps.get_profile.outputs.BUILD_PROFILE }} BUILD_PROFILE: ${{ steps.get_profile.outputs.BUILD_PROFILE }}
@ -119,8 +119,10 @@ jobs:
- [debian11, "debian:11-slim", "deploy/docker/Dockerfile"] - [debian11, "debian:11-slim", "deploy/docker/Dockerfile"]
# NOTE: 'otp' and 'elixir' are to configure emqx-builder image # NOTE: 'otp' and 'elixir' are to configure emqx-builder image
# only support latest otp and elixir, not a matrix # only support latest otp and elixir, not a matrix
builder:
- 5.0-26 # update to latest
otp: otp:
- 24.3.4.2-1 # update to latest - 24.3.4.2-1 # switch to 25 once ready to release 5.1
elixir: elixir:
- 1.13.4 # update to latest - 1.13.4 # update to latest
exclude: # TODO: publish enterprise to ecr too? exclude: # TODO: publish enterprise to ecr too?
@ -174,7 +176,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
build-args: | build-args: |
BUILD_FROM=ghcr.io/emqx/emqx-builder/5.0-24:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os[0] }} BUILD_FROM=ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os[0] }}
RUN_FROM=${{ matrix.os[1] }} RUN_FROM=${{ matrix.os[1] }}
EMQX_NAME=${{ steps.meta.outputs.emqx_name }} EMQX_NAME=${{ steps.meta.outputs.emqx_name }}
file: source/${{ matrix.os[2] }} file: source/${{ matrix.os[2] }}
@ -208,8 +210,10 @@ jobs:
- 'docker.io' - 'docker.io'
os: os:
- [debian11, "debian:11-slim", "deploy/docker/Dockerfile"] - [debian11, "debian:11-slim", "deploy/docker/Dockerfile"]
builder:
- 5.0-26 # update to latest
otp: otp:
- 24.3.4.2-1 # update to latest - 25.1.2-2 # update to latest
elixir: elixir:
- 1.13.4 # update to latest - 1.13.4 # update to latest
@ -252,7 +256,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
build-args: | build-args: |
BUILD_FROM=ghcr.io/emqx/emqx-builder/5.0-24:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os[0] }} BUILD_FROM=ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os[0] }}
RUN_FROM=${{ matrix.os[1] }} RUN_FROM=${{ matrix.os[1] }}
EMQX_NAME=${{ steps.meta.outputs.emqx_name }} EMQX_NAME=${{ steps.meta.outputs.emqx_name }}
file: source/${{ matrix.os[2] }} file: source/${{ matrix.os[2] }}
@ -277,7 +281,7 @@ jobs:
- [debian11, "debian:11-slim", "deploy/docker/Dockerfile"] - [debian11, "debian:11-slim", "deploy/docker/Dockerfile"]
# NOTE: only support latest otp version, not a matrix # NOTE: only support latest otp version, not a matrix
otp: otp:
- 24.3.4.2-1 # update to latest - 24.3.4.2-1 # switch to 25 once ready to release 5.1
registry: registry:
- 'docker.io' - 'docker.io'
- 'public.ecr.aws' - 'public.ecr.aws'
@ -342,7 +346,7 @@ jobs:
- ${{ needs.prepare.outputs.BUILD_PROFILE }} - ${{ needs.prepare.outputs.BUILD_PROFILE }}
# NOTE: for docker, only support latest otp version, not a matrix # NOTE: for docker, only support latest otp version, not a matrix
otp: otp:
- 24.3.4.2-1 # update to latest - 25.1.2-2 # update to latest
elixir: elixir:
- 1.13.4 # update to latest - 1.13.4 # update to latest
registry: registry:

View File

@ -23,7 +23,7 @@ on:
jobs: jobs:
prepare: prepare:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/5.0-24:1.13.4-24.3.4.2-1-ubuntu20.04 container: ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-24.3.4.2-1-ubuntu20.04
outputs: outputs:
BUILD_PROFILE: ${{ steps.get_profile.outputs.BUILD_PROFILE }} BUILD_PROFILE: ${{ steps.get_profile.outputs.BUILD_PROFILE }}
IS_EXACT_TAG: ${{ steps.get_profile.outputs.IS_EXACT_TAG }} IS_EXACT_TAG: ${{ steps.get_profile.outputs.IS_EXACT_TAG }}
@ -48,7 +48,7 @@ jobs:
echo "WARN: This is NOT an exact git tag, will not publish release" echo "WARN: This is NOT an exact git tag, will not publish release"
is_exact_tag='false' is_exact_tag='false'
fi fi
echo "::set-output name=IS_EXACT_TAG::${is_exact_tag}" echo "IS_EXACT_TAG=${is_exact_tag}" >> $GITHUB_OUTPUT
case $tag in case $tag in
refs/tags/v*) refs/tags/v*)
PROFILE='emqx' PROFILE='emqx'
@ -103,7 +103,7 @@ jobs:
- uses: ilammy/msvc-dev-cmd@v1.12.0 - uses: ilammy/msvc-dev-cmd@v1.12.0
- uses: erlef/setup-beam@v1 - uses: erlef/setup-beam@v1
with: with:
otp-version: 24.2.1 otp-version: 24.3.4
- name: build - name: build
env: env:
PYTHON: python PYTHON: python
@ -173,13 +173,15 @@ jobs:
needs: prepare needs: prepare
runs-on: ${{ matrix.build_machine }} runs-on: ${{ matrix.build_machine }}
container: container:
image: "ghcr.io/emqx/emqx-builder/5.0-24:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os }}" image: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os }}"
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
profile: profile:
- ${{ needs.prepare.outputs.BUILD_PROFILE }} - ${{ needs.prepare.outputs.BUILD_PROFILE }}
builder:
- 5.0-26
otp: otp:
- 24.3.4.2-1 - 24.3.4.2-1
elixir: elixir:
@ -244,6 +246,7 @@ jobs:
- name: build emqx packages - name: build emqx packages
working-directory: source working-directory: source
env: env:
BUILDER: ${{ matrix.builder }}
OTP: ${{ matrix.otp }} OTP: ${{ matrix.otp }}
ELIXIR: ${{ matrix.elixir }} ELIXIR: ${{ matrix.elixir }}
PROFILE: ${{ matrix.profile }} PROFILE: ${{ matrix.profile }}
@ -272,7 +275,7 @@ jobs:
--pkgtype "${PKGTYPE}" \ --pkgtype "${PKGTYPE}" \
--arch "${ARCH}" \ --arch "${ARCH}" \
--elixir "${IsElixir}" \ --elixir "${IsElixir}" \
--builder "ghcr.io/emqx/emqx-builder/5.0-24:${ELIXIR}-${OTP}-${SYSTEM}" --builder "ghcr.io/emqx/emqx-builder/${BUILDER}:${ELIXIR}-${OTP}-${SYSTEM}"
done done
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:

View File

@ -31,12 +31,15 @@ jobs:
profile: profile:
- ["emqx", "el7"] - ["emqx", "el7"]
- ["emqx-enterprise", "ubuntu20.04"] - ["emqx-enterprise", "ubuntu20.04"]
builder:
- 5.0-26
otp: otp:
- 24.3.4.2-1 - 24.3.4.2-1
- 25.1.2-2
elixir: elixir:
- 1.13.4 - 1.13.4
container: "ghcr.io/emqx/emqx-builder/5.0-24:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.profile[1] }}" container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.profile[1] }}"
steps: steps:
- uses: AutoModality/action-clean@v1 - uses: AutoModality/action-clean@v1
@ -89,7 +92,8 @@ jobs:
profile: profile:
- emqx - emqx
otp: otp:
- 24.2.1 - 24.3.4
- 25.1.2
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1.12.0 - uses: ilammy/msvc-dev-cmd@v1.12.0
@ -130,6 +134,7 @@ jobs:
- emqx-enterprise - emqx-enterprise
otp: otp:
- 24.3.4.2-1 - 24.3.4.2-1
- 25.1.2-2
os: os:
- macos-11 - macos-11
- macos-12-arm64 - macos-12-arm64

View File

@ -5,7 +5,7 @@ on: [pull_request, push]
jobs: jobs:
check_deps_integrity: check_deps_integrity:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/5.0-24:1.13.4-24.3.4.2-1-ubuntu20.04 container: ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-25.1.2-2-ubuntu20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View File

@ -5,7 +5,7 @@ on: [pull_request]
jobs: jobs:
code_style_check: code_style_check:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: "ghcr.io/emqx/emqx-builder/5.0-24:1.13.4-24.3.4.2-1-ubuntu20.04" container: "ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-25.1.2-2-ubuntu20.04"
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:

View File

@ -8,7 +8,7 @@ jobs:
elixir_apps_check: elixir_apps_check:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# just use the latest builder # just use the latest builder
container: "ghcr.io/emqx/emqx-builder/5.0-24:1.13.4-24.3.4.2-1-ubuntu20.04" container: "ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-25.1.2-2-ubuntu20.04"
strategy: strategy:
fail-fast: false fail-fast: false

View File

@ -7,7 +7,7 @@ on: [pull_request, push]
jobs: jobs:
elixir_deps_check: elixir_deps_check:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/5.0-24:1.13.4-24.3.4.2-1-ubuntu20.04 container: ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-25.1.2-2-ubuntu20.04
steps: steps:
- name: Checkout - name: Checkout

View File

@ -17,8 +17,7 @@ jobs:
profile: profile:
- emqx - emqx
- emqx-enterprise - emqx-enterprise
container: ghcr.io/emqx/emqx-builder/5.0-24:1.13.4-24.3.4.2-1-ubuntu20.04 container: ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-25.1.2-2-ubuntu20.04
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3

View File

@ -11,8 +11,11 @@ jobs:
run_emqx_app_tests: run_emqx_app_tests:
strategy: strategy:
matrix: matrix:
builder:
- 5.0-26
otp: otp:
- 24.3.4.2-1 - 24.3.4.2-1
- 25.1.2-2
# no need to use more than 1 version of Elixir, since tests # no need to use more than 1 version of Elixir, since tests
# run using only Erlang code. This is needed just to specify # run using only Erlang code. This is needed just to specify
# the base image. # the base image.
@ -34,7 +37,7 @@ jobs:
use-self-hosted: false use-self-hosted: false
runs-on: ${{ matrix.runs-on }} runs-on: ${{ matrix.runs-on }}
container: "ghcr.io/emqx/emqx-builder/5.0-24:${{ matrix.elixir}}-${{ matrix.otp }}-${{ matrix.os }}" container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir}}-${{ matrix.otp }}-${{ matrix.os }}"
defaults: defaults:
run: run:

View File

@ -16,7 +16,7 @@ jobs:
prepare: prepare:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
# prepare source with any OTP version, no need for a matrix # prepare source with any OTP version, no need for a matrix
container: ghcr.io/emqx/emqx-builder/5.0-24:1.13.4-24.3.4.2-1-alpine3.15.1 container: ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-24.3.4.2-1-alpine3.15.1
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -48,6 +48,8 @@ jobs:
- rlog - rlog
os: os:
- ["alpine3.15.1", "alpine:3.15.1"] - ["alpine3.15.1", "alpine:3.15.1"]
builder:
- 5.0-26
otp: otp:
- 24.3.4.2-1 - 24.3.4.2-1
elixir: elixir:
@ -57,7 +59,7 @@ jobs:
steps: steps:
- uses: erlef/setup-beam@v1 - uses: erlef/setup-beam@v1
with: with:
otp-version: "24.2" otp-version: 24.3.4
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
name: source name: source
@ -68,7 +70,7 @@ jobs:
- name: make docker image - name: make docker image
working-directory: source working-directory: source
env: env:
EMQX_BUILDER: ghcr.io/emqx/emqx-builder/5.0-24:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os[0] }} EMQX_BUILDER: ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os[0] }}
EMQX_RUNNER: ${{ matrix.os[1] }} EMQX_RUNNER: ${{ matrix.os[1] }}
run: | run: |
make ${{ matrix.profile }}-docker make ${{ matrix.profile }}-docker
@ -119,6 +121,8 @@ jobs:
- emqx-enterprise - emqx-enterprise
os: os:
- ["debian11", "debian:11-slim"] - ["debian11", "debian:11-slim"]
builder:
- 5.0-26
otp: otp:
- 24.3.4.2-1 - 24.3.4.2-1
elixir: elixir:
@ -130,7 +134,7 @@ jobs:
steps: steps:
- uses: erlef/setup-beam@v1 - uses: erlef/setup-beam@v1
with: with:
otp-version: "24.2" otp-version: 24.3.4
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
name: source name: source
@ -141,7 +145,7 @@ jobs:
- name: make docker image - name: make docker image
working-directory: source working-directory: source
env: env:
EMQX_BUILDER: ghcr.io/emqx/emqx-builder/5.0-24:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os[0] }} EMQX_BUILDER: ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os[0] }}
EMQX_RUNNER: ${{ matrix.os[1] }} EMQX_RUNNER: ${{ matrix.os[1] }}
run: | run: |
make ${{ matrix.profile }}-docker make ${{ matrix.profile }}-docker

View File

@ -16,7 +16,7 @@ jobs:
steps: steps:
- uses: erlef/setup-beam@v1 - uses: erlef/setup-beam@v1
with: with:
otp-version: "24.2" otp-version: 24.3
- name: download jmeter - name: download jmeter
timeout-minutes: 3 timeout-minutes: 3
env: env:
@ -36,7 +36,7 @@ jobs:
PROFILE='emqx' PROFILE='emqx'
make "${PROFILE}-docker" make "${PROFILE}-docker"
VSN="$(./pkg-vsn.sh $PROFILE)" VSN="$(./pkg-vsn.sh $PROFILE)"
echo "::set-output name=version::${VSN}" echo "version=${VSN}" >> $GITHUB_OUTPUT
docker save -o emqx.tar emqx/emqx:${VSN} docker save -o emqx.tar emqx/emqx:${VSN}
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
@ -59,7 +59,7 @@ jobs:
steps: steps:
- uses: erlef/setup-beam@v1 - uses: erlef/setup-beam@v1
with: with:
otp-version: "24.2" otp-version: 24.3
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
@ -155,7 +155,7 @@ jobs:
steps: steps:
- uses: erlef/setup-beam@v1 - uses: erlef/setup-beam@v1
with: with:
otp-version: "24.2" otp-version: 24.3
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
@ -261,7 +261,7 @@ jobs:
steps: steps:
- uses: erlef/setup-beam@v1 - uses: erlef/setup-beam@v1
with: with:
otp-version: "24.2" otp-version: 24.3
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
@ -363,7 +363,7 @@ jobs:
steps: steps:
- uses: erlef/setup-beam@v1 - uses: erlef/setup-beam@v1
with: with:
otp-version: "24.2" otp-version: 24.3
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
@ -462,7 +462,7 @@ jobs:
steps: steps:
- uses: erlef/setup-beam@v1 - uses: erlef/setup-beam@v1
with: with:
otp-version: "24.2" otp-version: 24.3
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:

View File

@ -16,7 +16,7 @@ on:
jobs: jobs:
relup_test_plan: relup_test_plan:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: "ghcr.io/emqx/emqx-builder/5.0-24:1.13.4-24.3.4.2-1-ubuntu20.04" container: "ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-24.3.4.2-1-ubuntu20.04"
outputs: outputs:
CUR_EE_VSN: ${{ steps.find-versions.outputs.CUR_EE_VSN }} CUR_EE_VSN: ${{ steps.find-versions.outputs.CUR_EE_VSN }}
OLD_VERSIONS: ${{ steps.find-versions.outputs.OLD_VERSIONS }} OLD_VERSIONS: ${{ steps.find-versions.outputs.OLD_VERSIONS }}
@ -37,8 +37,8 @@ jobs:
ee_vsn="$(./pkg-vsn.sh enterprise)" ee_vsn="$(./pkg-vsn.sh enterprise)"
old_ee_vsns="$(./scripts/relup-build/base-vsns.sh enterprise | xargs)" old_ee_vsns="$(./scripts/relup-build/base-vsns.sh enterprise | xargs)"
old_vsns=$(echo -n "${old_ee_vsns}" | sed 's/ $//g' | jq -R -s -c 'split(" ")') old_vsns=$(echo -n "${old_ee_vsns}" | sed 's/ $//g' | jq -R -s -c 'split(" ")')
echo "::set-output name=CUR_EE_VSN::$ee_vsn" echo "CUR_EE_VSN=$ee_vsn" >> $GITHUB_OUTPUT
echo "::set-output name=OLD_VERSIONS::$old_vsns" echo "OLD_VERSIONS=$old_vsns" >> $GITHUB_OUTPUT
- name: build emqx - name: build emqx
run: | run: |
set -x set -x
@ -74,7 +74,7 @@ jobs:
# setup Erlang to run lux # setup Erlang to run lux
- uses: erlef/setup-beam@v1 - uses: erlef/setup-beam@v1
with: with:
otp-version: "24.2" otp-version: 24.3
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
repository: hawk/lux repository: hawk/lux

View File

@ -16,8 +16,20 @@ on:
jobs: jobs:
prepare: prepare:
runs-on: aws-amd64 runs-on: aws-amd64
# prepare source with any OTP version, no need for a matrix strategy:
container: "ghcr.io/emqx/emqx-builder/5.0-24:1.13.4-24.3.4.2-1-ubuntu20.04" fail-fast: false
matrix:
profile:
- emqx
- emqx-enterprise
builder:
- 5.0-26
otp:
- 24.3.4.2-1
- 25.1.2-2
elixir:
- 1.13.4
container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu20.04"
outputs: outputs:
fast_ct_apps: ${{ steps.find_ct_apps.outputs.fast_ct_apps }} fast_ct_apps: ${{ steps.find_ct_apps.outputs.fast_ct_apps }}
docker_ct_apps: ${{ steps.find_ct_apps.outputs.docker_ct_apps }} docker_ct_apps: ${{ steps.find_ct_apps.outputs.docker_ct_apps }}
@ -32,57 +44,27 @@ jobs:
run: | run: |
fast_ct_apps="$(./scripts/find-apps.sh --ci fast)" fast_ct_apps="$(./scripts/find-apps.sh --ci fast)"
docker_ct_apps="$(./scripts/find-apps.sh --ci docker)" docker_ct_apps="$(./scripts/find-apps.sh --ci docker)"
echo "fast: $fast_ct_apps" echo "fast_ct_apps=$fast_ct_apps" | tee -a $GITHUB_OUTPUT
echo "docker: $docker_ct_apps" echo "docker_ct_apps=$docker_ct_apps" | tee -a $GITHUB_OUTPUT
echo "::set-output name=fast_ct_apps::$fast_ct_apps"
echo "::set-output name=docker_ct_apps::$docker_ct_apps"
- name: get_all_deps - name: get_all_deps
working-directory: source working-directory: source
env: env:
PROFILE: emqx PROFILE: ${{ matrix.profile }}
#DIAGNOSTIC: 1 #DIAGNOSTIC: 1
run: | run: |
make ensure-rebar3 make ensure-rebar3
# fetch all deps and compile # fetch all deps and compile
make emqx make ${{ matrix.profile }}
make test-compile make test-compile
cd .. cd ..
zip -ryq source.zip source/* source/.[^.]* zip -ryq source.zip source/* source/.[^.]*
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: source-emqx name: source-${{ matrix.profile }}-${{ matrix.otp }}
path: source.zip
prepare_ee:
runs-on: aws-amd64
# prepare source with any OTP version, no need for a matrix
container: "ghcr.io/emqx/emqx-builder/5.0-18:1.13.4-24.3.4.2-1-ubuntu20.04"
steps:
- uses: AutoModality/action-clean@v1
- uses: actions/checkout@v3
with:
path: source
- name: get_all_deps
working-directory: source
env:
PROFILE: emqx-enterprise
#DIAGNOSTIC: 1
run: |
make ensure-rebar3
# fetch all deps and compile
make emqx-enterprise
make test-compile
cd ..
zip -ryq source.zip source/* source/.[^.]*
- uses: actions/upload-artifact@v3
with:
name: source-emqx-enterprise
path: source.zip path: source.zip
eunit_and_proper: eunit_and_proper:
needs: needs: [prepare]
- prepare
- prepare_ee
runs-on: ${{ matrix.runs-on }} runs-on: ${{ matrix.runs-on }}
strategy: strategy:
fail-fast: false fail-fast: false
@ -90,6 +72,13 @@ jobs:
profile: profile:
- emqx - emqx
- emqx-enterprise - emqx-enterprise
builder:
- 5.0-26
otp:
- 24.3.4.2-1
- 25.1.2-2
elixir:
- 1.13.4
runs-on: runs-on:
- aws-amd64 - aws-amd64
- ubuntu-20.04 - ubuntu-20.04
@ -104,17 +93,15 @@ jobs:
defaults: defaults:
run: run:
shell: bash shell: bash
container: "ghcr.io/emqx/emqx-builder/5.0-24:1.13.4-24.3.4.2-1-ubuntu20.04" container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu20.04"
steps: steps:
- uses: AutoModality/action-clean@v1 - uses: AutoModality/action-clean@v1
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
name: source-${{ matrix.profile }} name: source-${{ matrix.profile }}-${{ matrix.otp }}
path: . path: .
- name: unzip source code - name: unzip source code
env:
PROFILE: ${{ matrix.profile }}
run: unzip -o -q source.zip run: unzip -o -q source.zip
# produces eunit.coverdata # produces eunit.coverdata
- name: eunit - name: eunit
@ -136,9 +123,7 @@ jobs:
path: source/_build/test/cover path: source/_build/test/cover
ct_docker: ct_docker:
needs: needs: [prepare]
- prepare
- prepare_ee
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -148,11 +133,19 @@ jobs:
- ubuntu-20.04 - ubuntu-20.04
use-self-hosted: use-self-hosted:
- ${{ github.repository_owner == 'emqx' }} - ${{ github.repository_owner == 'emqx' }}
builder:
- 5.0-26
otp:
- 24.3.4.2-1
- 25.1.2-2
elixir:
- 1.13.4
exclude: exclude:
- runs-on: ubuntu-20.04 - runs-on: ubuntu-20.04
use-self-hosted: true use-self-hosted: true
- runs-on: aws-amd64 - runs-on: aws-amd64
use-self-hosted: false use-self-hosted: false
runs-on: ${{ matrix.runs-on }} runs-on: ${{ matrix.runs-on }}
defaults: defaults:
run: run:
@ -162,13 +155,14 @@ jobs:
- uses: AutoModality/action-clean@v1 - uses: AutoModality/action-clean@v1
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
name: source-${{ matrix.app[1] }} name: source-${{ matrix.app[1] }}-${{ matrix.otp }}
path: . path: .
- name: unzip source code - name: unzip source code
run: unzip -q source.zip run: unzip -q source.zip
- name: run tests - name: run tests
working-directory: source working-directory: source
env: env:
DOCKER_CT_RUNNER_IMAGE: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu20.04"
MONGO_TAG: 5 MONGO_TAG: 5
MYSQL_TAG: 8 MYSQL_TAG: 8
PGSQL_TAG: 13 PGSQL_TAG: 13
@ -191,13 +185,18 @@ jobs:
path: source/_build/test/logs path: source/_build/test/logs
ct: ct:
needs: needs: [prepare]
- prepare
- prepare_ee
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
app: ${{ fromJson(needs.prepare.outputs.fast_ct_apps) }} app: ${{ fromJson(needs.prepare.outputs.fast_ct_apps) }}
builder:
- 5.0-26
otp:
- 24.3.4.2-1
- 25.1.2-2
elixir:
- 1.13.4
runs-on: runs-on:
- aws-amd64 - aws-amd64
- ubuntu-20.04 - ubuntu-20.04
@ -210,7 +209,7 @@ jobs:
use-self-hosted: false use-self-hosted: false
runs-on: ${{ matrix.runs-on }} runs-on: ${{ matrix.runs-on }}
container: "ghcr.io/emqx/emqx-builder/5.0-24:1.13.4-24.3.4.2-1-ubuntu20.04" container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu20.04"
defaults: defaults:
run: run:
shell: bash shell: bash
@ -219,7 +218,7 @@ jobs:
- uses: AutoModality/action-clean@v1 - uses: AutoModality/action-clean@v1
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
name: source-${{ matrix.app[1] }} name: source-${{ matrix.app[1] }}-${{ matrix.otp }}
path: . path: .
- name: unzip source code - name: unzip source code
run: unzip -q source.zip run: unzip -q source.zip
@ -249,12 +248,12 @@ jobs:
- ct - ct
- ct_docker - ct_docker
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: "ghcr.io/emqx/emqx-builder/5.0-24:1.13.4-24.3.4.2-1-ubuntu20.04" container: "ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-24.3.4.2-1-ubuntu20.04"
steps: steps:
- uses: AutoModality/action-clean@v1 - uses: AutoModality/action-clean@v1
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
name: source-emqx-enterprise name: source-emqx-enterprise-24.3.4.2-1
path: . path: .
- name: unzip source code - name: unzip source code
run: unzip -q source.zip run: unzip -q source.zip

View File

@ -2,7 +2,7 @@ REBAR = $(CURDIR)/rebar3
BUILD = $(CURDIR)/build BUILD = $(CURDIR)/build
SCRIPTS = $(CURDIR)/scripts SCRIPTS = $(CURDIR)/scripts
export EMQX_RELUP ?= true export EMQX_RELUP ?= true
export EMQX_DEFAULT_BUILDER = ghcr.io/emqx/emqx-builder/5.0-17:1.13.4-24.2.1-1-debian11 export EMQX_DEFAULT_BUILDER = ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-24.3.4.2-1-debian11
export EMQX_DEFAULT_RUNNER = debian:11-slim export EMQX_DEFAULT_RUNNER = debian:11-slim
export OTP_VSN ?= $(shell $(CURDIR)/scripts/get-otp-vsn.sh) export OTP_VSN ?= $(shell $(CURDIR)/scripts/get-otp-vsn.sh)
export ELIXIR_VSN ?= $(shell $(CURDIR)/scripts/get-elixir-vsn.sh) export ELIXIR_VSN ?= $(shell $(CURDIR)/scripts/get-elixir-vsn.sh)

View File

@ -1,4 +1,4 @@
ARG BUILD_FROM=ghcr.io/emqx/emqx-builder/5.0-17:1.13.4-24.2.1-1-debian11 ARG BUILD_FROM=ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-24.3.4.2-1-debian11
ARG RUN_FROM=debian:11-slim ARG RUN_FROM=debian:11-slim
FROM ${BUILD_FROM} AS builder FROM ${BUILD_FROM} AS builder

View File

@ -1,4 +1,4 @@
ARG BUILD_FROM=ghcr.io/emqx/emqx-builder/5.0-15:1.13.3-24.2.1-1-alpine3.15.1 ARG BUILD_FROM=ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-24.3.4.2-1-alpine3.15.1
ARG RUN_FROM=alpine:3.15.1 ARG RUN_FROM=alpine:3.15.1
FROM ${BUILD_FROM} AS builder FROM ${BUILD_FROM} AS builder

View File

@ -15,8 +15,8 @@ do(Dir, CONFIG) ->
end. end.
assert_otp() -> assert_otp() ->
Oldest = 23, Oldest = 24,
Latest = 24, Latest = 25,
OtpRelease = list_to_integer(erlang:system_info(otp_release)), OtpRelease = list_to_integer(erlang:system_info(otp_release)),
case OtpRelease < Oldest orelse OtpRelease > Latest of case OtpRelease < Oldest orelse OtpRelease > Latest of
true -> true ->

View File

@ -9,7 +9,7 @@
## example: ## example:
## ./scripts/buildx.sh --profile emqx --pkgtype tgz --arch arm64 \ ## ./scripts/buildx.sh --profile emqx --pkgtype tgz --arch arm64 \
## --builder ghcr.io/emqx/emqx-builder/5.0-17:1.13.4-24.2.1-1-debian10 ## --builder ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-24.3.4.2-1-debian11
set -euo pipefail set -euo pipefail
@ -22,9 +22,9 @@ help() {
echo "--elixir: Specify if the release should be built with Elixir, " echo "--elixir: Specify if the release should be built with Elixir, "
echo " defaults to 'no'." echo " defaults to 'no'."
echo "--arch amd64|arm64: Target arch to build the EMQX package for" echo "--arch amd64|arm64: Target arch to build the EMQX package for"
echo "--src_dir <SRC_DIR>: EMQX source ode in this dir, default to PWD" echo "--src_dir <SRC_DIR>: EMQX source code in this dir, default to PWD"
echo "--builder <BUILDER>: Builder image to pull" echo "--builder <BUILDER>: Builder image to pull"
echo " E.g. ghcr.io/emqx/emqx-builder/5.0-17:1.13.4-24.2.1-1-debian10" echo " E.g. ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-24.3.4.2-1-debian11"
} }
while [ "$#" -gt 0 ]; do while [ "$#" -gt 0 ]; do

View File

@ -66,7 +66,7 @@ if [ "${WHICH_APP}" = 'novalue' ]; then
exit 1 exit 1
fi fi
ERLANG_CONTAINER='erlang24' ERLANG_CONTAINER='erlang'
DOCKER_CT_ENVS_FILE="${WHICH_APP}/docker-ct" DOCKER_CT_ENVS_FILE="${WHICH_APP}/docker-ct"
case "${WHICH_APP}" in case "${WHICH_APP}" in
@ -89,7 +89,7 @@ FILES=( )
for dep in ${CT_DEPS}; do for dep in ${CT_DEPS}; do
case "${dep}" in case "${dep}" in
erlang24) erlang)
FILES+=( '.ci/docker-compose-file/docker-compose.yaml' ) FILES+=( '.ci/docker-compose-file/docker-compose.yaml' )
;; ;;
toxiproxy) toxiproxy)

View File

@ -45,8 +45,8 @@ fi
# From now on, no need for the v|e prefix # From now on, no need for the v|e prefix
OLD_VSN="${old_vsn#[e|v]}" OLD_VSN="${old_vsn#[e|v]}"
OLD_PKG="$(pwd)/_upgrade_base/${profile}-${OLD_VSN}-otp24.2.1-1-ubuntu20.04-amd64.tar.gz" OLD_PKG="$(pwd)/_upgrade_base/${profile}-${OLD_VSN}-otp24.3.4.2-1-ubuntu20.04-amd64.tar.gz"
CUR_PKG="$(pwd)/_packages/${profile}/${profile}-${cur_vsn}-otp24.2.1-1-ubuntu20.04-amd64.tar.gz" CUR_PKG="$(pwd)/_packages/${profile}/${profile}-${cur_vsn}-otp24.3.4.2-1-ubuntu20.04-amd64.tar.gz"
if [ ! -f "$OLD_PKG" ]; then if [ ! -f "$OLD_PKG" ]; then
echo "$OLD_PKG not found" echo "$OLD_PKG not found"

View File

@ -22,7 +22,7 @@ WEBHOOK="webhook.$NET"
BENCH="bench.$NET" BENCH="bench.$NET"
COOKIE='this-is-a-secret' COOKIE='this-is-a-secret'
## Erlang image is needed to run webhook server and emqtt-bench ## Erlang image is needed to run webhook server and emqtt-bench
ERLANG_IMAGE="ghcr.io/emqx/emqx-builder/5.0-17:1.13.4-24.2.1-1-ubuntu20.04" ERLANG_IMAGE="ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-24.3.4.2-1-ubuntu20.04"
# builder has emqtt-bench installed # builder has emqtt-bench installed
BENCH_IMAGE="$ERLANG_IMAGE" BENCH_IMAGE="$ERLANG_IMAGE"