From 280fedca0d306af43a3ac308b64ae6e763589c07 Mon Sep 17 00:00:00 2001 From: zhanghongtong Date: Fri, 19 Mar 2021 10:37:25 +0000 Subject: [PATCH] chore(CI): cts support enterprise repos --- .ci/apps_tests/{.opensource.env => .env} | 0 .github/workflows/run_cts_tests.yaml | 25 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) rename .ci/apps_tests/{.opensource.env => .env} (100%) diff --git a/.ci/apps_tests/.opensource.env b/.ci/apps_tests/.env similarity index 100% rename from .ci/apps_tests/.opensource.env rename to .ci/apps_tests/.env diff --git a/.github/workflows/run_cts_tests.yaml b/.github/workflows/run_cts_tests.yaml index 9dafcedb3..6ce4719bb 100644 --- a/.github/workflows/run_cts_tests.yaml +++ b/.github/workflows/run_cts_tests.yaml @@ -38,6 +38,11 @@ jobs: if: matrix.network_type == 'ipv6' run: | echo EMQX_AUTH__LDAP__SERVERS=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.GlobalIPv6Address}}{{end}}' ldap) >> "$GITHUB_ENV" + - name: set git token + run: | + if make emqx-ee --dry-run > /dev/null 2>&1; then + docker exec -i erlang bash -c "echo \"https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com\" > /root/.git-credentials && git config --global credential.helper store" + fi - name: run test cases run: | export CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_ @@ -96,6 +101,11 @@ jobs: if: matrix.network_type == 'ipv6' run: | echo "EMQX_AUTH__MONGO__SERVER=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.GlobalIPv6Address}}{{end}}' mongo):27017" >> "$GITHUB_ENV" + - name: set git token + run: | + if make emqx-ee --dry-run > /dev/null 2>&1; then + docker exec -i erlang bash -c "echo \"https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com\" > /root/.git-credentials && git config --global credential.helper store" + fi - name: run test cases run: | export CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_ @@ -154,6 +164,11 @@ jobs: if: matrix.network_type == 'ipv6' run: | echo "EMQX_AUTH__MYSQL__SERVER=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.GlobalIPv6Address}}{{end}}' mysql):3306" >> "$GITHUB_ENV" + - name: set git token + run: | + if make emqx-ee --dry-run > /dev/null 2>&1; then + docker exec -i erlang bash -c "echo \"https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com\" > /root/.git-credentials && git config --global credential.helper store" + fi - name: run test cases run: | export EMQX_AUTH__MYSQL__USERNAME=root \ @@ -216,6 +231,11 @@ jobs: if: matrix.network_type == 'ipv6' run: | echo "EMQX_AUTH__PGSQL__SERVER=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.GlobalIPv6Address}}{{end}}' pgsql):5432" >> "$GITHUB_ENV" + - name: set git token + run: | + if make emqx-ee --dry-run > /dev/null 2>&1; then + docker exec -i erlang bash -c "echo \"https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com\" > /root/.git-credentials && git config --global credential.helper store" + fi - name: run test cases run: | export EMQX_AUTH__PGSQL__USERNAME=root \ @@ -317,6 +337,11 @@ jobs: EMQX_AUTH__REDIS__TYPE=cluster EMQX_AUTH__REDIS__SERVER=${redis_${{ matrix.network_type }}_address}:8000 EOF + - name: set git token + run: | + if make emqx-ee --dry-run > /dev/null 2>&1; then + docker exec -i erlang bash -c "echo \"https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com\" > /root/.git-credentials && git config --global credential.helper store" + fi - name: run test cases run: | export CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_