Merge pull request #10785 from zmstone/0523-fix-windows-default-log-dir-environment-variable

fix(windows): set EMQX_LOG_DIR env variable
This commit is contained in:
Zaiming (Stone) Shi 2023-05-23 20:13:29 +02:00 committed by GitHub
commit c15e2f8708
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions

View File

@ -102,9 +102,16 @@ jobs:
- name: run emqx - name: run emqx
timeout-minutes: 5 timeout-minutes: 5
run: | run: |
$ErrorActionPreference = "Stop"
./_build/${{ matrix.profile }}/rel/emqx/bin/emqx start ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx start
Start-Sleep -s 5 Start-Sleep -s 10
echo "EMQX started" $pingOutput = ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx ping
if ($pingOutput = 'pong') {
echo "EMQX started OK"
} else {
echo "Failed to ping EMQX $pingOutput"
Exit 1
}
./_build/${{ matrix.profile }}/rel/emqx/bin/emqx stop ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx stop
echo "EMQX stopped" echo "EMQX stopped"
./_build/${{ matrix.profile }}/rel/emqx/bin/emqx install ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx install

View File

@ -46,6 +46,7 @@
@set "RUNNER_ROOT_DIR=%rel_root_dir%" @set "RUNNER_ROOT_DIR=%rel_root_dir%"
:: hard code etc dir :: hard code etc dir
@set "EMQX_ETC_DIR=%rel_root_dir%\etc" @set "EMQX_ETC_DIR=%rel_root_dir%\etc"
@set "EMQX_LOG_DIR=%rel_root_dir%\log"
@set "etc_dir=%rel_root_dir%\etc" @set "etc_dir=%rel_root_dir%\etc"
@set "lib_dir=%rel_root_dir%\lib" @set "lib_dir=%rel_root_dir%\lib"
@set "emqx_conf=%etc_dir%\emqx.conf" @set "emqx_conf=%etc_dir%\emqx.conf"

View File

@ -0,0 +1,3 @@
Ensure `EMQX_LOG_DIR` is set by Windows boot script.
The environment variable `EMQX_LOG_DIR` was missing in v5.0.25, caused EMQX Windows package fail to boot unless set by sysadmin.