Merge pull request #6516 from Rory-Z/ci/fix-env-error

ci(cts): fix env error
This commit is contained in:
tigercl 2021-12-22 16:52:23 +08:00 committed by GitHub
commit 9b632c034f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 27 additions and 16 deletions

View File

@ -3,6 +3,7 @@ name: Compatibility Test Suite
on: on:
schedule: schedule:
- cron: '0 */6 * * *' - cron: '0 */6 * * *'
pull_request:
push: push:
tags: tags:
- v* - v*
@ -46,10 +47,12 @@ jobs:
fi fi
- name: run test cases - name: run test cases
run: | run: |
export CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_
printenv > .env
docker exec -i erlang sh -c "make ensure-rebar3" docker exec -i erlang sh -c "make ensure-rebar3"
docker exec --env-file .env -i erlang sh -c "./rebar3 ct --dir apps/emqx_auth_ldap" printenv | grep "^EMQX_" > .env
docker exec -i \
-e "CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_" \
--env-file .env \
erlang sh -c "./rebar3 ct --dir apps/emqx_auth_ldap"
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1
if: failure() if: failure()
with: with:
@ -114,9 +117,11 @@ jobs:
fi fi
- name: run test cases - name: run test cases
run: | run: |
export CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_ printenv | grep "^EMQX_" > .env
printenv > .env docker exec -i \
docker exec --env-file .env -i erlang sh -c "make apps/emqx_auth_mongo-ct" -e "CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_" \
--env-file .env \
erlang sh -c "make apps/emqx_auth_mongo-ct"
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1
if: failure() if: failure()
with: with:
@ -194,9 +199,11 @@ jobs:
fi fi
- name: run test cases - name: run test cases
run: | run: |
export CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_ printenv | grep "^EMQX_" > .env
printenv > .env docker exec -i \
docker exec --env-file .env -i erlang sh -c "make apps/emqx_auth_mysql-ct" -e "CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_" \
--env-file .env \
erlang sh -c "make apps/emqx_auth_mysql-ct"
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1
if: failure() if: failure()
with: with:
@ -265,10 +272,12 @@ jobs:
run: | run: |
export EMQX_AUTH__PGSQL__USERNAME=root \ export EMQX_AUTH__PGSQL__USERNAME=root \
EMQX_AUTH__PGSQL__PASSWORD=public \ EMQX_AUTH__PGSQL__PASSWORD=public \
EMQX_AUTH__PGSQL__DATABASE=mqtt \ EMQX_AUTH__PGSQL__DATABASE=mqtt
CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_ printenv | grep "^EMQX_" > .env
printenv > .env docker exec -i \
docker exec --env-file .env -i erlang sh -c "make apps/emqx_auth_pgsql-ct" -e "CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_" \
--env-file .env \
erlang sh -c "make apps/emqx_auth_pgsql-ct"
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1
if: failure() if: failure()
with: with:
@ -384,10 +393,12 @@ jobs:
fi fi
- name: run test cases - name: run test cases
run: | run: |
export CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_
export EMQX_AUTH__REIDS__PASSWORD=public export EMQX_AUTH__REIDS__PASSWORD=public
printenv > .env printenv | grep "^EMQX_" > .env
docker exec --env-file .env -i erlang sh -c "make apps/emqx_auth_redis-ct" docker exec -i \
-e "CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_" \
--env-file .env \
erlang sh -c "make apps/emqx_auth_redis-ct"
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1
if: failure() if: failure()
with: with: