Merge pull request #6421 from Rory-Z/chore/bump-otp-version

ci: bump otp version to 24.1.5-3
This commit is contained in:
tigercl 2021-12-17 18:16:03 +08:00 committed by GitHub
commit de7d510552
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 92 additions and 32 deletions

View File

@ -1,4 +1,4 @@
ARG BUILD_FROM=ghcr.io/emqx/emqx-builder/4.4-2:23.3.4.9-3-ubuntu20.04
ARG BUILD_FROM=ghcr.io/emqx/emqx-builder/4.4-4:24.1.5-3-ubuntu20.04
FROM ${BUILD_FROM}
ARG EMQX_NAME=emqx

View File

@ -3,7 +3,7 @@ version: '3.9'
services:
erlang:
container_name: erlang
image: ghcr.io/emqx/emqx-builder/4.4-2:23.3.4.9-3-ubuntu20.04
image: ghcr.io/emqx/emqx-builder/4.4-4:24.1.5-3-ubuntu20.04
env_file:
- conf.env
environment:

View File

@ -15,8 +15,8 @@ PROFILE="$1"
VSN="$2"
OLD_VSN="$3"
PACKAGE_PATH="$4"
FROM_OTP_VSN="${5:-23.3.4.9-3}"
TO_OTP_VSN="${6:-23.3.4.9-3}"
FROM_OTP_VSN="${5:-24.1.5-3}"
TO_OTP_VSN="${6:-24.1.5-3}"
TEMPDIR=$(mktemp -d)
trap '{ rm -rf -- "$TEMPDIR"; }' EXIT

View File

@ -16,7 +16,7 @@ jobs:
prepare:
runs-on: ubuntu-20.04
# prepare source with any OTP version, no need for a matrix
container: ghcr.io/emqx/emqx-builder/4.4-2:23.3.4.9-3-ubuntu20.04
container: ghcr.io/emqx/emqx-builder/4.4-4:24.1.5-3-ubuntu20.04
outputs:
profiles: ${{ steps.set_profile.outputs.profiles }}
@ -141,7 +141,7 @@ jobs:
matrix:
profile: ${{fromJSON(needs.prepare.outputs.profiles)}}
erl_otp:
- 23.3.4.9-3
- 24.1.5-3
macos:
- macos-11
- macos-10.15
@ -224,8 +224,12 @@ jobs:
fail-fast: false
matrix:
profile: ${{fromJSON(needs.prepare.outputs.profiles)}}
package:
- zip
- pkg
otp:
- 23.3.4.9-3
- 24.1.5-3
arch:
- amd64
- arm64
@ -242,6 +246,8 @@ jobs:
- raspbian10
# - raspbian9
exclude:
- package: pkg
otp: 23.3.4.9-3
- os: centos6
arch: arm64
- os: raspbian9
@ -274,6 +280,7 @@ jobs:
- name: unzip source code
run: unzip -q source.zip
- name: downloads old emqx zip packages
if: matrix.package == 'zip'
env:
OTP_VSN: ${{ matrix.otp }}
PROFILE: ${{ matrix.profile }}
@ -306,6 +313,7 @@ jobs:
env:
OTP: ${{ matrix.otp }}
PROFILE: ${{ matrix.profile }}
PACKAGE: ${{ matrix.package}}
ARCH: ${{ matrix.arch }}
SYSTEM: ${{ matrix.os }}
working-directory: source
@ -314,9 +322,8 @@ jobs:
-v $(pwd):/emqx \
--workdir /emqx \
--platform linux/$ARCH \
ghcr.io/emqx/emqx-builder/4.4-2:$OTP-$SYSTEM \
bash -euc "make $PROFILE-zip || cat rebar3.crashdump; \
make $PROFILE-pkg || cat rebar3.crashdump; \
ghcr.io/emqx/emqx-builder/4.4-4:$OTP-$SYSTEM \
bash -euc "make ${PROFILE}-${PACKAGE} || cat rebar3.crashdump; \
EMQX_NAME=$PROFILE && .ci/build_packages/tests.sh"
- name: create sha256
working-directory: source
@ -345,7 +352,7 @@ jobs:
matrix:
profile: ${{fromJSON(needs.prepare.outputs.profiles)}}
otp:
- 23.3.4.9-3
- 24.1.5-3
steps:
- uses: actions/download-artifact@v2
@ -386,7 +393,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILD_FROM=ghcr.io/emqx/emqx-builder/4.4-2:${{ matrix.otp }}-alpine3.14
BUILD_FROM=ghcr.io/emqx/emqx-builder/4.4-4:${{ matrix.otp }}-alpine3.14
RUN_FROM=alpine:3.14
EMQX_NAME=${{ matrix.profile }}
file: source/deploy/docker/Dockerfile
@ -425,7 +432,7 @@ jobs:
matrix:
profile: ${{fromJSON(needs.prepare.outputs.profiles)}}
otp:
- 23.3.4.9-3
- 24.1.5-3
steps:
- uses: actions/checkout@v2

View File

@ -22,11 +22,12 @@ jobs:
matrix:
erl_otp:
- 23.3.4.9-3
- 24.1.5-3
os:
- ubuntu20.04
- centos7
container: ghcr.io/emqx/emqx-builder/4.4-2:${{ matrix.erl_otp }}-${{ matrix.os }}
container: ghcr.io/emqx/emqx-builder/4.4-4:${{ matrix.erl_otp }}-${{ matrix.os }}
steps:
- uses: actions/checkout@v1
@ -64,7 +65,7 @@ jobs:
fail-fast: false
matrix:
erl_otp:
- 23.3.4.9-3
- 24.1.5-3
macos:
- macos-11
- macos-10.15

View File

@ -5,7 +5,7 @@ on: [pull_request]
jobs:
check_deps_integrity:
runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/4.4-2:23.3.4.9-3-ubuntu20.04
container: ghcr.io/emqx/emqx-builder/4.4-4:24.1.5-3-ubuntu20.04
steps:
- uses: actions/checkout@v2

View File

@ -5,7 +5,7 @@ on: workflow_dispatch
jobs:
test:
runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/4.4-2:23.3.4.9-3-ubuntu20.04
container: ghcr.io/emqx/emqx-builder/4.4-4:24.1.5-3-ubuntu20.04
strategy:
fail-fast: true
env:

View File

@ -44,7 +44,7 @@ jobs:
fi
- name: build docker image
env:
OTP_VSN: 23.3.4.9-3
OTP_VSN: 24.1.5-3
run: |
make ${{ steps.prepare.outputs.imgname }}-docker
docker save emqx/${{ steps.prepare.outputs.imgname }}:${{ steps.prepare.outputs.version }} -o image.tar.gz

View File

@ -31,7 +31,7 @@ jobs:
fi
- name: make emqx image
env:
OTP_VSN: 23.3.4.9-3
OTP_VSN: 24.1.5-3
run: make ${PROFILE}-docker
- name: run emqx
timeout-minutes: 5
@ -92,7 +92,7 @@ jobs:
fi
- name: make emqx image
env:
OTP_VSN: 23.3.4.9-3
OTP_VSN: 24.1.5-3
run: make ${PROFILE}-docker
- name: install k3s
env:
@ -224,7 +224,7 @@ jobs:
relup_test_plan:
runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/4.4-2:23.3.4.9-3-ubuntu20.04
container: ghcr.io/emqx/emqx-builder/4.4-4:24.1.5-3-ubuntu20.04
outputs:
profile: ${{ steps.profile-and-versions.outputs.profile }}
vsn: ${{ steps.profile-and-versions.outputs.vsn }}
@ -273,7 +273,7 @@ jobs:
relup_test_build:
needs: relup_test_plan
runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/4.4-2:23.3.4.9-3-ubuntu20.04
container: ghcr.io/emqx/emqx-builder/4.4-4:24.1.5-3-ubuntu20.04
defaults:
run:
shell: bash
@ -360,8 +360,8 @@ jobs:
--var ONE_MORE_EMQX_PATH=$(pwd)/one_more_emqx \
--var VSN="$VSN" \
--var OLD_VSN="$OLD_VSN" \
--var FROM_OTP_VSN="23.3.4.9-3" \
--var TO_OTP_VSN="23.3.4.9-3" \
--var FROM_OTP_VSN="24.1.5-3" \
--var TO_OTP_VSN="24.1.5-3" \
emqx_built/.ci/fvt_tests/relup.lux
- uses: actions/upload-artifact@v2
name: Save debug data

View File

@ -10,7 +10,7 @@ on:
jobs:
run_static_analysis:
runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/4.4-2:23.3.4.9-3-ubuntu20.04
container: ghcr.io/emqx/emqx-builder/4.4-4:24.1.5-3-ubuntu20.04
steps:
- uses: actions/checkout@v2
@ -27,7 +27,7 @@ jobs:
run_proper_test:
runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/4.4-2:23.3.4.9-3-ubuntu20.04
container: ghcr.io/emqx/emqx-builder/4.4-4:24.1.5-3-ubuntu20.04
steps:
- uses: actions/checkout@v2

View File

@ -1 +1 @@
erlang 23.3.4.9-3
erlang 24.1.5-3

View File

@ -3,7 +3,7 @@ REBAR_VERSION = 3.14.3-emqx-8
REBAR = $(CURDIR)/rebar3
BUILD = $(CURDIR)/build
SCRIPTS = $(CURDIR)/scripts
export EMQX_DEFAULT_BUILDER = ghcr.io/emqx/emqx-builder/4.4-2:23.3.4.9-3-alpine3.14
export EMQX_DEFAULT_BUILDER = ghcr.io/emqx/emqx-builder/4.4-4:24.1.5-3-alpine3.14
export EMQX_DEFAULT_RUNNER = alpine:3.14
export OTP_VSN ?= $(shell $(CURDIR)/scripts/get-otp-vsn.sh)
export PKG_VSN ?= $(shell $(CURDIR)/pkg-vsn.sh)

View File

@ -4,6 +4,11 @@
set -e
DEBUG="${DEBUG:-0}"
if [ "$DEBUG" -eq 1 ]; then
set -x
fi
ROOT_DIR="$(cd "$(dirname "$(readlink "$0" || echo "$0")")"/..; pwd -P)"
# shellcheck disable=SC1090
. "$ROOT_DIR"/releases/emqx_vars
@ -299,6 +304,43 @@ generate_config() {
fi
}
# check if a PID is down
is_down() {
PID="$1"
if ps -p "$PID" >/dev/null; then
# still around
# shellcheck disable=SC2009 # this grep pattern is not a part of the progra names
if ps -p "$PID" | grep -q 'defunct'; then
# zombie state, print parent pid
parent="$(ps -o ppid= -p "$PID" | tr -d ' ')"
echo "WARN: $PID is marked <defunct>, parent:"
ps -p "$parent"
return 0
fi
return 1
fi
# it's gone
return 0
}
wait_for() {
local WAIT_TIME
local CMD
WAIT_TIME="$1"
shift
CMD="$*"
while true; do
if $CMD >/dev/null 2>&1; then
return 0
fi
if [ "$WAIT_TIME" -le 0 ]; then
return 1
fi
WAIT_TIME=$((WAIT_TIME - 1))
sleep 1
done
}
# Call bootstrapd for daemon commands like start/stop/console
bootstrapd() {
if [ -e "$RUNNER_DATA_DIR/.erlang.cookie" ]; then
@ -485,11 +527,21 @@ case "$1" in
# Wait for the node to completely stop...
PID="$(relx_get_pid)"
if ! relx_nodetool "stop"; then
echoerr "Graceful shutdown failed PID=[$PID]"
exit 1
fi
while kill -s 0 "$PID" 2>/dev/null; do
sleep 1
done
WAIT_TIME="${WAIT_FOR_ERLANG_STOP:-60}"
if ! wait_for "$WAIT_TIME" 'is_down' "$PID"; then
msg="dangling after ${WAIT_TIME} seconds"
# also log to syslog
logger -t "${REL_NAME}[${PID}]" "STOP: $msg"
# log to user console
echoerr "stop failed, $msg"
echo "ERROR: $PID is still around"
ps -p "$PID"
exit 1
fi
logger -t "${REL_NAME}[${PID}]" "STOP: OK"
;;
restart|reboot)

2
build
View File

@ -150,7 +150,7 @@ make_docker() {
## Name Default Example
## ---------------------------------------------------------------------
## EMQX_BASE_IMAGE current os centos:7
## EMQX_ZIP_PACKAGE _packages/<current-zip-target> /tmp/emqx-4.4.0-otp23.3.4.9-3-centos7-amd64.zip
## EMQX_ZIP_PACKAGE _packages/<current-zip-target> /tmp/emqx-4.4.0-otp24.1.5-3-centos7-amd64.zip
## EMQX_IMAGE_TAG emqx/emqx:<current-vns-rel> emqx/emqx:testing-tag
##
make_docker_testing() {

View File

@ -1,4 +1,4 @@
ARG BUILD_FROM=ghcr.io/emqx/emqx-builder/4.4-2:23.3.4.9-3-alpine3.14
ARG BUILD_FROM=ghcr.io/emqx/emqx-builder/4.4-4:24.1.5-3-alpine3.14
ARG RUN_FROM=alpine:3.14
FROM ${BUILD_FROM} AS builder