Explorar el Código

build: rename emqx-ee to emqx-enterprise

Zaiming Shi hace 4 años
padre
commit
e2d7ff2b0f

+ 7 - 7
.github/workflows/build_packages.yaml

@@ -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"

+ 2 - 2
.github/workflows/build_slim_packages.yaml

@@ -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:

+ 1 - 1
.github/workflows/run_api_tests.yaml

@@ -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

+ 3 - 3
.github/workflows/run_fvt_tests.yaml

@@ -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

+ 2 - 2
.github/workflows/run_relup_tests.yaml

@@ -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
 
 

+ 0 - 12
.github/workflows/run_test_cases.yaml

@@ -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
 
 

+ 3 - 3
Makefile

@@ -15,8 +15,8 @@ ifeq ($(OS),Windows_NT)
 endif
 endif
 
 
 PROFILE ?= emqx
 PROFILE ?= emqx
-REL_PROFILES := emqx emqx-edge emqx-ee
-PKG_PROFILES := emqx-pkg emqx-edge-pkg emqx-ee-pkg
+REL_PROFILES := emqx emqx-edge emqx-enterprise
+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)

+ 3 - 5
build

@@ -52,13 +52,10 @@ log() {
 }
 }
 
 
 docgen() {
 docgen() {
-    local conf_doc_html libs_dir1 libs_dir2
-    conf_doc_html="$(pwd)/_build/${PROFILE}/rel/emqx/etc/emqx-config-doc.html"
-    echo "===< Generating config document $conf_doc_html"
+    local libs_dir1 libs_dir2
     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)

+ 1 - 0
deploy/docker/Dockerfile

@@ -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/

+ 46 - 38
rebar.config.erl

@@ -148,44 +148,52 @@ prod_overrides() ->
 
 
 profiles() ->
 profiles() ->
     Vsn = get_vsn(),
     Vsn = get_vsn(),
-    [ {'emqx',          [ {erl_opts, prod_compile_opts()}
-                        , {relx, relx(Vsn, cloud, bin, ce)}
-                        , {overrides, prod_overrides()}
-                        , {project_app_dirs, project_app_dirs(ce)}
-                        ]}
-    , {'emqx-pkg',      [ {erl_opts, prod_compile_opts()}
-                        , {relx, relx(Vsn, cloud, pkg, ce)}
-                        , {overrides, prod_overrides()}
-                        , {project_app_dirs, project_app_dirs(ce)}
-                        ]}
-    , {'emqx-ee',       [ {erl_opts, prod_compile_opts()}
-                        , {relx, relx(Vsn, cloud, bin, ee)}
-                        , {overrides, prod_overrides()}
-                        , {project_app_dirs, project_app_dirs(ee)}
-                        ]}
-    , {'emqx-ee-pkg',   [ {erl_opts, prod_compile_opts()}
-                        , {relx, relx(Vsn, cloud, pkg, ee)}
-                        , {overrides, prod_overrides()}
-                        , {project_app_dirs, project_app_dirs(ee)}
-                        ]}
-    , {'emqx-edge',     [ {erl_opts, prod_compile_opts()}
-                        , {relx, relx(Vsn, edge, bin, ce)}
-                        , {overrides, prod_overrides()}
-                        , {project_app_dirs, project_app_dirs(ce)}
-                        ]}
-    , {'emqx-edge-pkg', [ {erl_opts, prod_compile_opts()}
-                        , {relx, relx(Vsn, edge, pkg, ce)}
-                        , {overrides, prod_overrides()}
-                        , {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)}
-                        ]}
+    [ {'emqx',
+       [ {erl_opts, prod_compile_opts()}
+       , {relx, relx(Vsn, cloud, bin, ce)}
+       , {overrides, prod_overrides()}
+       , {project_app_dirs, project_app_dirs(ce)}
+       ]}
+    , {'emqx-pkg',
+       [ {erl_opts, prod_compile_opts()}
+       , {relx, relx(Vsn, cloud, pkg, ce)}
+       , {overrides, prod_overrides()}
+       , {project_app_dirs, project_app_dirs(ce)}
+       ]}
+    , {'emqx-enterprise',
+       [ {erl_opts, prod_compile_opts()}
+       , {relx, relx(Vsn, cloud, bin, ee)}
+       , {overrides, prod_overrides()}
+       , {project_app_dirs, project_app_dirs(ee)}
+       ]}
+    , {'emqx-enterprise-pkg',
+       [ {erl_opts, prod_compile_opts()}
+       , {relx, relx(Vsn, cloud, pkg, ee)}
+       , {overrides, prod_overrides()}
+       , {project_app_dirs, project_app_dirs(ee)}
+       ]}
+    , {'emqx-edge',
+       [ {erl_opts, prod_compile_opts()}
+       , {relx, relx(Vsn, edge, bin, ce)}
+       , {overrides, prod_overrides()}
+       , {project_app_dirs, project_app_dirs(ce)}
+       ]}
+    , {'emqx-edge-pkg',
+       [ {erl_opts, prod_compile_opts()}
+       , {relx, relx(Vsn, edge, pkg, ce)}
+       , {overrides, prod_overrides()}
+       , {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)