build: rename emqx-ee to emqx-enterprise

This commit is contained in:
Zaiming Shi 2021-11-24 20:54:46 +01:00 committed by Zaiming (Stone) Shi
parent 581cb6ac5d
commit e2d7ff2b0f
10 changed files with 68 additions and 73 deletions

View File

@ -127,7 +127,7 @@ jobs:
matrix: matrix:
profile: # no EDGE for mac profile: # no EDGE for mac
- emqx - emqx
- emqx-ee - emqx-enterprise
otp: otp:
- 24.1.5-2 - 24.1.5-2
macos: macos:
@ -213,7 +213,7 @@ jobs:
profile: ## all editions for linux profile: ## all editions for linux
- emqx-edge - emqx-edge
- emqx - emqx
- emqx-ee - emqx-enterprise
otp: otp:
- 24.1.5-2 # we test with OTP 23, but only build package on OTP 24 versions - 24.1.5-2 # we test with OTP 23, but only build package on OTP 24 versions
arch: arch:
@ -240,9 +240,9 @@ jobs:
- os: raspbian10 - os: raspbian10
profile: emqx profile: emqx
- os: raspbian9 - os: raspbian9
profile: emqx-ee profile: emqx-enterprise
- os: raspbian10 - os: raspbian10
profile: emqx-ee profile: emqx-enterprise
defaults: defaults:
run: run:
@ -333,7 +333,7 @@ jobs:
profile: # all editions for docker profile: # all editions for docker
- emqx-edge - emqx-edge
- emqx - emqx
- emqx-ee - emqx-enterprise
# 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.1.5-2 # update to latest - 24.1.5-2 # update to latest
@ -403,7 +403,7 @@ jobs:
profile: profile:
- emqx-edge - emqx-edge
- emqx - emqx
- emqx-ee - emqx-enterprise
otp: otp:
- 24.1.5-2 - 24.1.5-2
@ -463,7 +463,7 @@ jobs:
- name: update repo.emqx.io - name: update repo.emqx.io
if: github.event_name == 'release' if: github.event_name == 'release'
run: | run: |
if [ "${{ matrix. profile }}" = 'emqx-ee' ]; then if [ "${{ matrix.profile }}" = 'emqx-enterprise' ]; then
BOOL_FLAG_NAME="emqx_ee" BOOL_FLAG_NAME="emqx_ee"
else else
BOOL_FLAG_NAME="emqx_ce" BOOL_FLAG_NAME="emqx_ce"

View File

@ -22,7 +22,7 @@ jobs:
profile: profile:
- emqx-edge - emqx-edge
- emqx - emqx
- emqx-ee - emqx-enterprise
otp: otp:
- 24.1.5-2 - 24.1.5-2
os: os:
@ -53,7 +53,7 @@ jobs:
matrix: matrix:
profile: profile:
- emqx - emqx
- emqx-ee - emqx-enterprise
otp: otp:
- 24.1.5-2 - 24.1.5-2
macos: macos:

View File

@ -27,7 +27,7 @@ jobs:
run: | run: |
echo "https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com" > $HOME/.git-credentials echo "https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com" > $HOME/.git-credentials
git config --global credential.helper store git config --global credential.helper store
make emqx-ee-zip make emqx-enterprise-zip
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: emqx-broker name: emqx-broker

View File

@ -38,9 +38,9 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
profile: profile:
- emqx-edge
- emqx - emqx
- emqx-ee - emqx-edge
- emqx-enterprise
cluster_db_backend: cluster_db_backend:
- mnesia - mnesia
- rlog - rlog
@ -88,7 +88,7 @@ jobs:
matrix: matrix:
profile: profile:
- emqx - emqx
# - emqx-ee # TODO test enterprise # - emqx-enterprise # TODO test enterprise
steps: steps:
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2

View File

@ -17,7 +17,7 @@ jobs:
matrix: matrix:
profile: profile:
- emqx - emqx
- emqx-ee - emqx-enterprise
otp_vsn: otp_vsn:
- 24.1.5-2 - 24.1.5-2
@ -68,7 +68,7 @@ jobs:
if [ $PROFILE = "emqx" ];then if [ $PROFILE = "emqx" ];then
broker="emqx-ce" broker="emqx-ce"
else else
broker="emqx-ee" broker="emqx-enterprise"
fi fi
echo "BROKER=$broker" >> $GITHUB_ENV echo "BROKER=$broker" >> $GITHUB_ENV

View File

@ -23,12 +23,6 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: set git credentials
run: |
if make emqx-ee --dry-run > /dev/null 2>&1; then
echo "https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com" > $HOME/.git-credentials
git config --global credential.helper store
fi
- name: xref - name: xref
run: make xref run: make xref
- name: dialyzer - name: dialyzer
@ -45,12 +39,6 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: set git credentials
run: |
if make emqx-ee --dry-run > /dev/null 2>&1; then
echo "https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com" > $HOME/.git-credentials
git config --global credential.helper store
fi
- name: proper - name: proper
run: make proper run: make proper

View File

@ -15,8 +15,8 @@ ifeq ($(OS),Windows_NT)
endif endif
PROFILE ?= emqx PROFILE ?= emqx
REL_PROFILES := emqx emqx-edge emqx-ee REL_PROFILES := emqx emqx-edge emqx-enterprise
PKG_PROFILES := emqx-pkg emqx-edge-pkg emqx-ee-pkg PKG_PROFILES := emqx-pkg emqx-edge-pkg emqx-enterprise-pkg
PROFILES := $(REL_PROFILES) $(PKG_PROFILES) default PROFILES := $(REL_PROFILES) $(PKG_PROFILES) default
CT_NODE_NAME ?= 'test@127.0.0.1' CT_NODE_NAME ?= 'test@127.0.0.1'
@ -182,7 +182,7 @@ ALL_ZIPS = $(REL_PROFILES)
$(foreach zt,$(ALL_ZIPS),$(eval $(call gen-docker-target,$(zt)))) $(foreach zt,$(ALL_ZIPS),$(eval $(call gen-docker-target,$(zt))))
## emqx-docker-testing ## emqx-docker-testing
## emqx-ee-docker-testing ## emqx-enterprise-docker-testing
## is to directly copy a unzipped zip-package to a ## is to directly copy a unzipped zip-package to a
## base image such as ubuntu20.04. Mostly for testing ## base image such as ubuntu20.04. Mostly for testing
.PHONY: $(REL_PROFILES:%=%-docker-testing) .PHONY: $(REL_PROFILES:%=%-docker-testing)

8
build
View File

@ -52,13 +52,10 @@ log() {
} }
docgen() { docgen() {
local conf_doc_html libs_dir1 libs_dir2 local libs_dir1 libs_dir2
conf_doc_html="$(pwd)/_build/${PROFILE}/rel/emqx/etc/emqx-config-doc.html"
echo "===< Generating config document $conf_doc_html"
libs_dir1="$(find "_build/default/lib/" -maxdepth 2 -name ebin -type d)" libs_dir1="$(find "_build/default/lib/" -maxdepth 2 -name ebin -type d)"
libs_dir2="$(find "_build/$PROFILE/lib/" -maxdepth 2 -name ebin -type d)" libs_dir2="$(find "_build/$PROFILE/lib/" -maxdepth 2 -name ebin -type d)"
# shellcheck disable=SC2086
erl -noshell -pa $libs_dir1 $libs_dir2 -eval "file:write_file('$conf_doc_html', hocon_schema_html:gen(emqx_conf_schema, \"EMQ X ${PKG_VSN}\")), halt(0)."
local conf_doc_markdown local conf_doc_markdown
conf_doc_markdown="$(pwd)/_build/${PROFILE}/rel/emqx/etc/emqx-config-doc.md" conf_doc_markdown="$(pwd)/_build/${PROFILE}/rel/emqx/etc/emqx-config-doc.md"
echo "===< Generating config document $conf_doc_markdown" echo "===< Generating config document $conf_doc_markdown"
@ -146,6 +143,7 @@ make_zip() {
## for DEB and RPM packages the dependencies are resoved by yum and apt ## for DEB and RPM packages the dependencies are resoved by yum and apt
cp_dyn_libs "${tard}/emqx" cp_dyn_libs "${tard}/emqx"
(cd "${tard}" && zip -qr - emqx) > "${zipball}" (cd "${tard}" && zip -qr - emqx) > "${zipball}"
log "Zip package successfully created: ${zipball}"
} }
## This function builds the default docker image based on alpine:3.14 (by default) ## This function builds the default docker image based on alpine:3.14 (by default)

View File

@ -28,6 +28,7 @@ RUN cd /emqx \
FROM $RUN_FROM FROM $RUN_FROM
## define ARG again after 'FROM $RUN_FROM'
ARG EMQX_NAME=emqx ARG EMQX_NAME=emqx
COPY deploy/docker/docker-entrypoint.sh /usr/bin/ COPY deploy/docker/docker-entrypoint.sh /usr/bin/

View File

@ -148,44 +148,52 @@ prod_overrides() ->
profiles() -> profiles() ->
Vsn = get_vsn(), Vsn = get_vsn(),
[ {'emqx', [ {erl_opts, prod_compile_opts()} [ {'emqx',
, {relx, relx(Vsn, cloud, bin, ce)} [ {erl_opts, prod_compile_opts()}
, {overrides, prod_overrides()} , {relx, relx(Vsn, cloud, bin, ce)}
, {project_app_dirs, project_app_dirs(ce)} , {overrides, prod_overrides()}
]} , {project_app_dirs, project_app_dirs(ce)}
, {'emqx-pkg', [ {erl_opts, prod_compile_opts()} ]}
, {relx, relx(Vsn, cloud, pkg, ce)} , {'emqx-pkg',
, {overrides, prod_overrides()} [ {erl_opts, prod_compile_opts()}
, {project_app_dirs, project_app_dirs(ce)} , {relx, relx(Vsn, cloud, pkg, ce)}
]} , {overrides, prod_overrides()}
, {'emqx-ee', [ {erl_opts, prod_compile_opts()} , {project_app_dirs, project_app_dirs(ce)}
, {relx, relx(Vsn, cloud, bin, ee)} ]}
, {overrides, prod_overrides()} , {'emqx-enterprise',
, {project_app_dirs, project_app_dirs(ee)} [ {erl_opts, prod_compile_opts()}
]} , {relx, relx(Vsn, cloud, bin, ee)}
, {'emqx-ee-pkg', [ {erl_opts, prod_compile_opts()} , {overrides, prod_overrides()}
, {relx, relx(Vsn, cloud, pkg, ee)} , {project_app_dirs, project_app_dirs(ee)}
, {overrides, prod_overrides()} ]}
, {project_app_dirs, project_app_dirs(ee)} , {'emqx-enterprise-pkg',
]} [ {erl_opts, prod_compile_opts()}
, {'emqx-edge', [ {erl_opts, prod_compile_opts()} , {relx, relx(Vsn, cloud, pkg, ee)}
, {relx, relx(Vsn, edge, bin, ce)} , {overrides, prod_overrides()}
, {overrides, prod_overrides()} , {project_app_dirs, project_app_dirs(ee)}
, {project_app_dirs, project_app_dirs(ce)} ]}
]} , {'emqx-edge',
, {'emqx-edge-pkg', [ {erl_opts, prod_compile_opts()} [ {erl_opts, prod_compile_opts()}
, {relx, relx(Vsn, edge, pkg, ce)} , {relx, relx(Vsn, edge, bin, ce)}
, {overrides, prod_overrides()} , {overrides, prod_overrides()}
, {project_app_dirs, project_app_dirs(ce)} , {project_app_dirs, project_app_dirs(ce)}
]} ]}
, {check, [ {erl_opts, common_compile_opts()} , {'emqx-edge-pkg',
, {project_app_dirs, project_app_dirs(ce)} [ {erl_opts, prod_compile_opts()}
]} , {relx, relx(Vsn, edge, pkg, ce)}
, {test, [ {deps, test_deps()} , {overrides, prod_overrides()}
, {erl_opts, common_compile_opts() ++ erl_opts_i(ce) } , {project_app_dirs, project_app_dirs(ce)}
, {extra_src_dirs, [{"test", [{recursive, true}]}]} ]}
, {project_app_dirs, project_app_dirs(ce)} , {check,
]} [ {erl_opts, common_compile_opts()}
, {project_app_dirs, project_app_dirs(ce)}
]}
, {test,
[ {deps, test_deps()}
, {erl_opts, common_compile_opts() ++ erl_opts_i(ce) }
, {extra_src_dirs, [{"test", [{recursive, true}]}]}
, {project_app_dirs, project_app_dirs(ce)}
]}
]. ].
%% RelType: cloud (full size) | edge (slim size) %% RelType: cloud (full size) | edge (slim size)