ci: more fixes
This commit is contained in:
parent
de7838357f
commit
38809ffd4b
|
@ -154,6 +154,7 @@ jobs:
|
||||||
uses: ./.github/workflows/run_docker_tests.yaml
|
uses: ./.github/workflows/run_docker_tests.yaml
|
||||||
with:
|
with:
|
||||||
version-emqx: ${{ needs.sanity-checks.outputs.version-emqx }}
|
version-emqx: ${{ needs.sanity-checks.outputs.version-emqx }}
|
||||||
|
version-emqx-enterprise: ${{ needs.sanity-checks.outputs.version-emqx-enterprise }}
|
||||||
|
|
||||||
run_helm_tests:
|
run_helm_tests:
|
||||||
needs:
|
needs:
|
||||||
|
@ -162,3 +163,4 @@ jobs:
|
||||||
uses: ./.github/workflows/run_helm_tests.yaml
|
uses: ./.github/workflows/run_helm_tests.yaml
|
||||||
with:
|
with:
|
||||||
version-emqx: ${{ needs.sanity-checks.outputs.version-emqx }}
|
version-emqx: ${{ needs.sanity-checks.outputs.version-emqx }}
|
||||||
|
version-emqx-enterprise: ${{ needs.sanity-checks.outputs.version-emqx-enterprise }}
|
||||||
|
|
|
@ -10,6 +10,9 @@ on:
|
||||||
version-emqx:
|
version-emqx:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
version-emqx-enterprise:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
# on:
|
# on:
|
||||||
# push:
|
# push:
|
||||||
|
@ -21,12 +24,8 @@ on:
|
||||||
# pull_request:
|
# pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
main:
|
basic-tests:
|
||||||
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
|
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
|
||||||
env:
|
|
||||||
EMQX_NAME: ${{ matrix.profile[0] }}
|
|
||||||
PKG_VSN: ${{ matrix.profile[0] == 'emqx-enterprise' && inputs.version-emqx-enterprise || inputs.version-emqx }}
|
|
||||||
EMQX_IMAGE_OLD_VERSION_TAG: emqx/${{ matrix.profile[0] }}:${{ matrix.profile[1] }}
|
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
@ -36,28 +35,32 @@ jobs:
|
||||||
- ["emqx-elixir", "5.0.16"]
|
- ["emqx-elixir", "5.0.16"]
|
||||||
- ["emqx-enterprise", "5.0.1"]
|
- ["emqx-enterprise", "5.0.1"]
|
||||||
|
|
||||||
|
env:
|
||||||
|
EMQX_NAME: ${{ matrix.profile[0] }}
|
||||||
|
PKG_VSN: ${{ matrix.profile[0] == 'emqx-enterprise' && inputs.version-emqx-enterprise || inputs.version-emqx }}
|
||||||
|
EMQX_IMAGE_OLD_VERSION_TAG: emqx/${{ matrix.profile[0] }}:${{ matrix.profile[1] }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: AutoModality/action-clean@v1
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/download-artifact@v3
|
||||||
- uses: actions/download-artifact@v3
|
with:
|
||||||
with:
|
name: ${{ env.EMQX_NAME }}-docker
|
||||||
name: ${{ env.EMQX_NAME }}-docker
|
path: /tmp
|
||||||
path: /tmp
|
- name: load docker image
|
||||||
- name: load docker image
|
run: |
|
||||||
run: |
|
EMQX_IMAGE_TAG=$(docker load < /tmp/${EMQX_NAME}-${PKG_VSN}.tar.gz | sed 's/Loaded image: //g')
|
||||||
EMQX_IMAGE_TAG=$(docker load < /tmp/${EMQX_NAME}-${PKG_VSN}.tar.gz | sed 's/Loaded image: //g')
|
echo "EMQX_IMAGE_TAG=$EMQX_IMAGE_TAG" >> $GITHUB_ENV
|
||||||
echo "EMQX_IMAGE_TAG=$EMQX_IMAGE_TAG" >> $GITHUB_ENV
|
- name: test two nodes cluster with proto_dist=inet_tls in docker
|
||||||
- name: test two nodes cluster with proto_dist=inet_tls in docker
|
run: |
|
||||||
run: |
|
./scripts/test/start-two-nodes-in-docker.sh -P $EMQX_IMAGE_TAG $EMQX_IMAGE_OLD_VERSION_TAG
|
||||||
./scripts/test/start-two-nodes-in-docker.sh -P $EMQX_IMAGE_TAG $EMQX_IMAGE_OLD_VERSION_TAG
|
HTTP_PORT=$(docker inspect --format='{{(index (index .NetworkSettings.Ports "18083/tcp") 0).HostPort}}' haproxy)
|
||||||
HTTP_PORT=$(docker inspect --format='{{(index (index .NetworkSettings.Ports "18083/tcp") 0).HostPort}}' haproxy)
|
./scripts/test/emqx-smoke-test.sh localhost $HTTP_PORT
|
||||||
./scripts/test/emqx-smoke-test.sh localhost $HTTP_PORT
|
./scripts/test/start-two-nodes-in-docker.sh -c
|
||||||
./scripts/test/start-two-nodes-in-docker.sh -c
|
- name: dashboard tests
|
||||||
- name: dashboard tests
|
working-directory: ./scripts/ui-tests
|
||||||
working-directory: ./scripts/ui-tests
|
run: |
|
||||||
run: |
|
set -eu
|
||||||
set -eu
|
docker compose up --abort-on-container-exit --exit-code-from selenium
|
||||||
docker compose up --abort-on-container-exit --exit-code-from selenium
|
|
||||||
- name: cleanup
|
- name: cleanup
|
||||||
if: always()
|
if: always()
|
||||||
working-directory: ./scripts/ui-tests
|
working-directory: ./scripts/ui-tests
|
||||||
|
@ -82,35 +85,35 @@ jobs:
|
||||||
- mnesia
|
- mnesia
|
||||||
- rlog
|
- rlog
|
||||||
steps:
|
steps:
|
||||||
- uses: AutoModality/action-clean@v1
|
- uses: AutoModality/action-clean@v1
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ env.EMQX_NAME }}-docker
|
name: ${{ env.EMQX_NAME }}-docker
|
||||||
path: /tmp
|
path: /tmp
|
||||||
- name: load docker image
|
- name: load docker image
|
||||||
run: |
|
run: |
|
||||||
EMQX_IMAGE_TAG=$(docker load < /tmp/${EMQX_NAME}-${PKG_VSN}.tar.gz | sed 's/Loaded image: //g')
|
EMQX_IMAGE_TAG=$(docker load < /tmp/${EMQX_NAME}-${PKG_VSN}.tar.gz | sed 's/Loaded image: //g')
|
||||||
echo "EMQX_IMAGE_TAG=$EMQX_IMAGE_TAG" >> $GITHUB_ENV
|
echo "EMQX_IMAGE_TAG=$EMQX_IMAGE_TAG" >> $GITHUB_ENV
|
||||||
- name: run emqx
|
- name: run emqx
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
run: |
|
run: |
|
||||||
./.ci/docker-compose-file/scripts/run-emqx.sh $EMQX_IMAGE_TAG $DB_BACKEND
|
./.ci/docker-compose-file/scripts/run-emqx.sh $EMQX_IMAGE_TAG $DB_BACKEND
|
||||||
- name: make paho tests
|
- name: make paho tests
|
||||||
run: |
|
run: |
|
||||||
if ! docker exec -i python /scripts/pytest.sh "$DB_BACKEND"; then
|
if ! docker exec -i python /scripts/pytest.sh "$DB_BACKEND"; then
|
||||||
echo "DUMP_CONTAINER_LOGS_BGN"
|
echo "DUMP_CONTAINER_LOGS_BGN"
|
||||||
echo "============== haproxy =============="
|
echo "============== haproxy =============="
|
||||||
docker logs haproxy
|
docker logs haproxy
|
||||||
echo "============== node1 =============="
|
echo "============== node1 =============="
|
||||||
docker logs node1.emqx.io
|
docker logs node1.emqx.io
|
||||||
echo "============== node2 =============="
|
echo "============== node2 =============="
|
||||||
docker logs node2.emqx.io
|
docker logs node2.emqx.io
|
||||||
echo "DUMP_CONTAINER_LOGS_END"
|
echo "DUMP_CONTAINER_LOGS_END"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# simple smoke test for node_dump
|
# simple smoke test for node_dump
|
||||||
- name: test node_dump
|
- name: test node_dump
|
||||||
run: |
|
run: |
|
||||||
docker exec -u root node1.emqx.io apt update && apt install -y net-tools
|
docker exec -u root node1.emqx.io apt update && apt install -y net-tools
|
||||||
docker exec node1.emqx.io node_dump
|
docker exec node1.emqx.io node_dump
|
||||||
|
|
|
@ -10,6 +10,9 @@ on:
|
||||||
version-emqx:
|
version-emqx:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
version-emqx-enterprise:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
# on:
|
# on:
|
||||||
# push:
|
# push:
|
||||||
|
|
Loading…
Reference in New Issue