ci: use ephemeral self hosted runners

This commit is contained in:
Ivan Dyachkov 2023-09-21 09:35:04 +02:00
parent e049dc0e76
commit 9a881290b9
19 changed files with 83 additions and 102 deletions

View File

@ -16,7 +16,7 @@ env:
jobs: jobs:
sanity-checks: sanity-checks:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }} runs-on: ${{ fromJSON(github.repository_owner == 'emqx' && '["self-hosted","ephemeral"]' || '["ubuntu-22.04"]') }}
container: "ghcr.io/emqx/emqx-builder/5.1-4:1.14.5-25.3.2-2-ubuntu22.04" container: "ghcr.io/emqx/emqx-builder/5.1-4:1.14.5-25.3.2-2-ubuntu22.04"
outputs: outputs:
ct-matrix: ${{ steps.matrix.outputs.ct-matrix }} ct-matrix: ${{ steps.matrix.outputs.ct-matrix }}
@ -24,7 +24,7 @@ jobs:
ct-docker: ${{ steps.matrix.outputs.ct-docker }} ct-docker: ${{ steps.matrix.outputs.ct-docker }}
version-emqx: ${{ steps.matrix.outputs.version-emqx }} version-emqx: ${{ steps.matrix.outputs.version-emqx }}
version-emqx-enterprise: ${{ steps.matrix.outputs.version-emqx-enterprise }} version-emqx-enterprise: ${{ steps.matrix.outputs.version-emqx-enterprise }}
runner: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }} runner_labels: ${{ github.repository_owner == 'emqx' && '["self-hosted", "ephemeral"]' || '["ubuntu-22.04"]' }}
builder: "ghcr.io/emqx/emqx-builder/5.1-4:1.14.5-25.3.2-2-ubuntu22.04" builder: "ghcr.io/emqx/emqx-builder/5.1-4:1.14.5-25.3.2-2-ubuntu22.04"
builder_vsn: "5.1-4" builder_vsn: "5.1-4"
otp_vsn: "25.3.2-2" otp_vsn: "25.3.2-2"
@ -115,7 +115,7 @@ jobs:
echo "version-emqx-enterprise=$(./pkg-vsn.sh emqx-enterprise)" | tee -a $GITHUB_OUTPUT echo "version-emqx-enterprise=$(./pkg-vsn.sh emqx-enterprise)" | tee -a $GITHUB_OUTPUT
compile: compile:
runs-on: ${{ needs.sanity-checks.outputs.runner }} runs-on: ${{ fromJSON(needs.sanity-checks.outputs.runner_labels) }}
container: ${{ needs.sanity-checks.outputs.builder }} container: ${{ needs.sanity-checks.outputs.builder }}
needs: needs:
- sanity-checks - sanity-checks
@ -153,7 +153,7 @@ jobs:
- compile - compile
uses: ./.github/workflows/run_emqx_app_tests.yaml uses: ./.github/workflows/run_emqx_app_tests.yaml
with: with:
runner: ${{ needs.sanity-checks.outputs.runner }} runner_labels: ${{ needs.sanity-checks.outputs.runner_labels }}
builder: ${{ needs.sanity-checks.outputs.builder }} builder: ${{ needs.sanity-checks.outputs.builder }}
before_ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }} before_ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
after_ref: ${{ github.sha }} after_ref: ${{ github.sha }}
@ -164,7 +164,7 @@ jobs:
- compile - compile
uses: ./.github/workflows/run_test_cases.yaml uses: ./.github/workflows/run_test_cases.yaml
with: with:
runner: ${{ needs.sanity-checks.outputs.runner }} runner_labels: ${{ needs.sanity-checks.outputs.runner_labels }}
builder: ${{ needs.sanity-checks.outputs.builder }} builder: ${{ needs.sanity-checks.outputs.builder }}
ct-matrix: ${{ needs.sanity-checks.outputs.ct-matrix }} ct-matrix: ${{ needs.sanity-checks.outputs.ct-matrix }}
ct-host: ${{ needs.sanity-checks.outputs.ct-host }} ct-host: ${{ needs.sanity-checks.outputs.ct-host }}
@ -176,7 +176,7 @@ jobs:
- compile - compile
uses: ./.github/workflows/static_checks.yaml uses: ./.github/workflows/static_checks.yaml
with: with:
runner: ${{ needs.sanity-checks.outputs.runner }} runner_labels: ${{ needs.sanity-checks.outputs.runner_labels }}
builder: ${{ needs.sanity-checks.outputs.builder }} builder: ${{ needs.sanity-checks.outputs.builder }}
ct-matrix: ${{ needs.sanity-checks.outputs.ct-matrix }} ct-matrix: ${{ needs.sanity-checks.outputs.ct-matrix }}
@ -185,7 +185,7 @@ jobs:
- sanity-checks - sanity-checks
uses: ./.github/workflows/build_slim_packages.yaml uses: ./.github/workflows/build_slim_packages.yaml
with: with:
runner: ${{ needs.sanity-checks.outputs.runner }} runner_labels: ${{ needs.sanity-checks.outputs.runner_labels }}
builder: ${{ needs.sanity-checks.outputs.builder }} builder: ${{ needs.sanity-checks.outputs.builder }}
builder_vsn: ${{ needs.sanity-checks.outputs.builder_vsn }} builder_vsn: ${{ needs.sanity-checks.outputs.builder_vsn }}
otp_vsn: ${{ needs.sanity-checks.outputs.otp_vsn }} otp_vsn: ${{ needs.sanity-checks.outputs.otp_vsn }}
@ -196,6 +196,7 @@ jobs:
- sanity-checks - sanity-checks
uses: ./.github/workflows/build_docker_for_test.yaml uses: ./.github/workflows/build_docker_for_test.yaml
with: with:
runner_labels: ${{ needs.sanity-checks.outputs.runner_labels }}
otp_vsn: ${{ needs.sanity-checks.outputs.otp_vsn }} otp_vsn: ${{ needs.sanity-checks.outputs.otp_vsn }}
elixir_vsn: ${{ needs.sanity-checks.outputs.elixir_vsn }} elixir_vsn: ${{ needs.sanity-checks.outputs.elixir_vsn }}
version-emqx: ${{ needs.sanity-checks.outputs.version-emqx }} version-emqx: ${{ needs.sanity-checks.outputs.version-emqx }}
@ -207,7 +208,7 @@ jobs:
- build_slim_packages - build_slim_packages
uses: ./.github/workflows/spellcheck.yaml uses: ./.github/workflows/spellcheck.yaml
with: with:
runner: ${{ needs.sanity-checks.outputs.runner }} runner_labels: ${{ needs.sanity-checks.outputs.runner_labels }}
run_conf_tests: run_conf_tests:
needs: needs:
@ -215,7 +216,7 @@ jobs:
- compile - compile
uses: ./.github/workflows/run_conf_tests.yaml uses: ./.github/workflows/run_conf_tests.yaml
with: with:
runner: ${{ needs.sanity-checks.outputs.runner }} runner_labels: ${{ needs.sanity-checks.outputs.runner_labels }}
builder: ${{ needs.sanity-checks.outputs.builder }} builder: ${{ needs.sanity-checks.outputs.builder }}
check_deps_integrity: check_deps_integrity:
@ -223,7 +224,7 @@ jobs:
- sanity-checks - sanity-checks
uses: ./.github/workflows/check_deps_integrity.yaml uses: ./.github/workflows/check_deps_integrity.yaml
with: with:
runner: ${{ needs.sanity-checks.outputs.runner }} runner_labels: ${{ needs.sanity-checks.outputs.runner_labels }}
builder: ${{ needs.sanity-checks.outputs.builder }} builder: ${{ needs.sanity-checks.outputs.builder }}
run_jmeter_tests: run_jmeter_tests:
@ -232,6 +233,7 @@ jobs:
- build_docker_for_test - build_docker_for_test
uses: ./.github/workflows/run_jmeter_tests.yaml uses: ./.github/workflows/run_jmeter_tests.yaml
with: with:
runner_labels: ${{ needs.sanity-checks.outputs.runner_labels }}
version-emqx: ${{ needs.sanity-checks.outputs.version-emqx }} version-emqx: ${{ needs.sanity-checks.outputs.version-emqx }}
run_docker_tests: run_docker_tests:
@ -240,7 +242,7 @@ jobs:
- build_docker_for_test - build_docker_for_test
uses: ./.github/workflows/run_docker_tests.yaml uses: ./.github/workflows/run_docker_tests.yaml
with: with:
runner: ${{ needs.sanity-checks.outputs.runner }} runner_labels: ${{ needs.sanity-checks.outputs.runner_labels }}
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 }} version-emqx-enterprise: ${{ needs.sanity-checks.outputs.version-emqx-enterprise }}
@ -250,5 +252,6 @@ jobs:
- build_docker_for_test - build_docker_for_test
uses: ./.github/workflows/run_helm_tests.yaml uses: ./.github/workflows/run_helm_tests.yaml
with: with:
runner_labels: ${{ needs.sanity-checks.outputs.runner_labels }}
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 }} version-emqx-enterprise: ${{ needs.sanity-checks.outputs.version-emqx-enterprise }}

View File

@ -11,9 +11,7 @@ on:
- 'e*' - 'e*'
branches: branches:
- 'master' - 'master'
- 'release-51' - 'release-5?'
- 'release-52'
- 'release-53'
- 'ci/**' - 'ci/**'
env: env:
@ -21,7 +19,7 @@ env:
jobs: jobs:
prepare: prepare:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }} runs-on: ${{ fromJSON(github.repository_owner == 'emqx' && '["self-hosted", "ephemeral"]' || '["ubuntu-22.04"]') }}
container: 'ghcr.io/emqx/emqx-builder/5.1-4:1.14.5-25.3.2-2-ubuntu22.04' container: 'ghcr.io/emqx/emqx-builder/5.1-4:1.14.5-25.3.2-2-ubuntu22.04'
outputs: outputs:
profile: ${{ steps.parse-git-ref.outputs.profile }} profile: ${{ steps.parse-git-ref.outputs.profile }}
@ -31,7 +29,7 @@ jobs:
ct-matrix: ${{ steps.matrix.outputs.ct-matrix }} ct-matrix: ${{ steps.matrix.outputs.ct-matrix }}
ct-host: ${{ steps.matrix.outputs.ct-host }} ct-host: ${{ steps.matrix.outputs.ct-host }}
ct-docker: ${{ steps.matrix.outputs.ct-docker }} ct-docker: ${{ steps.matrix.outputs.ct-docker }}
runner: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }} runner_labels: ${{ github.repository_owner == 'emqx' && '["aws-amd64"]' || '["ubuntu-22.04"]' }}
builder: 'ghcr.io/emqx/emqx-builder/5.1-4:1.14.5-25.3.2-2-ubuntu22.04' builder: 'ghcr.io/emqx/emqx-builder/5.1-4:1.14.5-25.3.2-2-ubuntu22.04'
builder_vsn: '5.1-4' builder_vsn: '5.1-4'
otp_vsn: '25.3.2-2' otp_vsn: '25.3.2-2'
@ -95,7 +93,6 @@ jobs:
otp_vsn: ${{ needs.prepare.outputs.otp_vsn }} otp_vsn: ${{ needs.prepare.outputs.otp_vsn }}
elixir_vsn: ${{ needs.prepare.outputs.elixir_vsn }} elixir_vsn: ${{ needs.prepare.outputs.elixir_vsn }}
builder_vsn: ${{ needs.prepare.outputs.builder_vsn }} builder_vsn: ${{ needs.prepare.outputs.builder_vsn }}
runner: ${{ needs.prepare.outputs.runner }}
secrets: inherit secrets: inherit
build_and_push_docker_images: build_and_push_docker_images:
@ -111,7 +108,7 @@ jobs:
otp_vsn: ${{ needs.prepare.outputs.otp_vsn }} otp_vsn: ${{ needs.prepare.outputs.otp_vsn }}
elixir_vsn: ${{ needs.prepare.outputs.elixir_vsn }} elixir_vsn: ${{ needs.prepare.outputs.elixir_vsn }}
builder_vsn: ${{ needs.prepare.outputs.builder_vsn }} builder_vsn: ${{ needs.prepare.outputs.builder_vsn }}
runner: ${{ needs.prepare.outputs.runner }} runner_labels: ${{ needs.prepare.outputs.runner_labels }}
secrets: inherit secrets: inherit
build_slim_packages: build_slim_packages:
@ -120,7 +117,7 @@ jobs:
- prepare - prepare
uses: ./.github/workflows/build_slim_packages.yaml uses: ./.github/workflows/build_slim_packages.yaml
with: with:
runner: ${{ needs.prepare.outputs.runner }} runner_labels: ${{ needs.prepare.outputs.runner_labels }}
builder: ${{ needs.prepare.outputs.builder }} builder: ${{ needs.prepare.outputs.builder }}
builder_vsn: ${{ needs.prepare.outputs.builder_vsn }} builder_vsn: ${{ needs.prepare.outputs.builder_vsn }}
otp_vsn: ${{ needs.prepare.outputs.otp_vsn }} otp_vsn: ${{ needs.prepare.outputs.otp_vsn }}
@ -128,7 +125,7 @@ jobs:
compile: compile:
if: needs.prepare.outputs.release != 'true' if: needs.prepare.outputs.release != 'true'
runs-on: ${{ needs.prepare.outputs.runner }} runs-on: ${{ fromJSON(needs.prepare.outputs.runner_labels) }}
container: ${{ needs.prepare.outputs.builder }} container: ${{ needs.prepare.outputs.builder }}
needs: needs:
- prepare - prepare
@ -165,7 +162,7 @@ jobs:
- compile - compile
uses: ./.github/workflows/run_emqx_app_tests.yaml uses: ./.github/workflows/run_emqx_app_tests.yaml
with: with:
runner: ${{ needs.prepare.outputs.runner }} runner_labels: ${{ needs.prepare.outputs.runner_labels }}
builder: ${{ needs.prepare.outputs.builder }} builder: ${{ needs.prepare.outputs.builder }}
before_ref: ${{ github.event.before }} before_ref: ${{ github.event.before }}
after_ref: ${{ github.sha }} after_ref: ${{ github.sha }}
@ -177,7 +174,7 @@ jobs:
- compile - compile
uses: ./.github/workflows/run_test_cases.yaml uses: ./.github/workflows/run_test_cases.yaml
with: with:
runner: ${{ needs.prepare.outputs.runner }} runner_labels: ${{ needs.prepare.outputs.runner_labels }}
builder: ${{ needs.prepare.outputs.builder }} builder: ${{ needs.prepare.outputs.builder }}
ct-matrix: ${{ needs.prepare.outputs.ct-matrix }} ct-matrix: ${{ needs.prepare.outputs.ct-matrix }}
ct-host: ${{ needs.prepare.outputs.ct-host }} ct-host: ${{ needs.prepare.outputs.ct-host }}
@ -190,7 +187,7 @@ jobs:
- compile - compile
uses: ./.github/workflows/run_conf_tests.yaml uses: ./.github/workflows/run_conf_tests.yaml
with: with:
runner: ${{ needs.prepare.outputs.runner }} runner_labels: ${{ needs.prepare.outputs.runner_labels }}
builder: ${{ needs.prepare.outputs.builder }} builder: ${{ needs.prepare.outputs.builder }}
static_checks: static_checks:
@ -200,6 +197,6 @@ jobs:
- compile - compile
uses: ./.github/workflows/static_checks.yaml uses: ./.github/workflows/static_checks.yaml
with: with:
runner: ${{ needs.prepare.outputs.runner }} runner_labels: ${{ needs.prepare.outputs.runner_labels }}
builder: ${{ needs.prepare.outputs.builder }} builder: ${{ needs.prepare.outputs.builder }}
ct-matrix: ${{ needs.prepare.outputs.ct-matrix }} ct-matrix: ${{ needs.prepare.outputs.ct-matrix }}

View File

@ -28,7 +28,7 @@ on:
builder_vsn: builder_vsn:
required: true required: true
type: string type: string
runner: runner_labels:
required: true required: true
type: string type: string
secrets: secrets:
@ -70,14 +70,14 @@ on:
required: false required: false
type: string type: string
default: '5.1-4' default: '5.1-4'
runner: runner_labels:
required: false required: false
type: string type: string
default: 'ubuntu-22.04' default: '["self-hosted","ephemeral"]'
jobs: jobs:
docker: docker:
runs-on: ${{ inputs.runner }} runs-on: ${{ fromJSON(inputs.runner_labels) }}
strategy: strategy:
fail-fast: false fail-fast: false

View File

@ -7,6 +7,9 @@ concurrency:
on: on:
workflow_call: workflow_call:
inputs: inputs:
runner_labels:
required: true
type: string
otp_vsn: otp_vsn:
required: true required: true
type: string type: string
@ -22,7 +25,7 @@ on:
jobs: jobs:
docker: docker:
runs-on: ubuntu-latest runs-on: ${{ fromJSON(inputs.runner_labels) }}
env: env:
EMQX_NAME: ${{ matrix.profile }} EMQX_NAME: ${{ matrix.profile }}
PKG_VSN: ${{ startsWith(matrix.profile, 'emqx-enterprise') && inputs.version-emqx-enterprise || inputs.version-emqx }} PKG_VSN: ${{ startsWith(matrix.profile, 'emqx-enterprise') && inputs.version-emqx-enterprise || inputs.version-emqx }}

View File

@ -19,9 +19,6 @@ on:
elixir_vsn: elixir_vsn:
required: true required: true
type: string type: string
runner:
required: true
type: string
builder_vsn: builder_vsn:
required: true required: true
type: string type: string
@ -62,10 +59,6 @@ on:
required: false required: false
type: string type: string
default: '1.14.5' default: '1.14.5'
runner:
required: false
type: string
default: 'ubuntu-22.04'
builder_vsn: builder_vsn:
required: false required: false
type: string type: string
@ -158,7 +151,7 @@ jobs:
path: _packages/${{ matrix.profile }}/ path: _packages/${{ matrix.profile }}/
linux: linux:
runs-on: ${{ matrix.build_machine }} runs-on: ['self-hosted', 'linux', "${{ matrix.arch }}"]
# always run in builder container because the host might have the wrong OTP version etc. # always run in builder container because the host might have the wrong OTP version etc.
# otherwise buildx.sh does not run docker if arch and os matches the target arch and os. # otherwise buildx.sh does not run docker if arch and os matches the target arch and os.
container: container:
@ -172,7 +165,7 @@ jobs:
otp: otp:
- ${{ inputs.otp_vsn }} - ${{ inputs.otp_vsn }}
arch: arch:
- amd64 - x64
- arm64 - arm64
os: os:
- ubuntu22.04 - ubuntu22.04
@ -186,26 +179,17 @@ jobs:
- el7 - el7
- amzn2 - amzn2
- amzn2023 - amzn2023
build_machine:
- aws-arm64
- aws-amd64
builder: builder:
- ${{ inputs.builder_vsn }} - ${{ inputs.builder_vsn }}
elixir: elixir:
- ${{ inputs.elixir_vsn }} - ${{ inputs.elixir_vsn }}
with_elixir: with_elixir:
- 'no' - 'no'
exclude:
- arch: arm64
build_machine: aws-amd64
- arch: amd64
build_machine: aws-arm64
include: include:
- profile: emqx - profile: emqx
otp: ${{ inputs.otp_vsn }} otp: ${{ inputs.otp_vsn }}
arch: amd64 arch: x64
os: ubuntu22.04 os: ubuntu22.04
build_machine: aws-amd64
builder: ${{ inputs.builder_vsn }} builder: ${{ inputs.builder_vsn }}
elixir: ${{ inputs.elixir_vsn }} elixir: ${{ inputs.elixir_vsn }}
with_elixir: 'yes' with_elixir: 'yes'

View File

@ -12,7 +12,7 @@ on:
jobs: jobs:
linux: linux:
if: github.repository_owner == 'emqx' if: github.repository_owner == 'emqx'
runs-on: aws-${{ matrix.arch }} runs-on: ['self-hosted', 'linux', "${{ matrix.arch }}", 'ephemeral']
container: container:
image: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os }}" image: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os }}"
@ -26,7 +26,7 @@ jobs:
otp: otp:
- 25.3.2-2 - 25.3.2-2
arch: arch:
- amd64 - x64
os: os:
- debian10 - debian10
- ubuntu22.04 - ubuntu22.04
@ -41,7 +41,6 @@ jobs:
shell: bash shell: bash
steps: steps:
- uses: emqx/self-hosted-cleanup-action@v1.0.3
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ matrix.profile[1] }} ref: ${{ matrix.profile[1] }}
@ -105,7 +104,6 @@ jobs:
- macos-12-arm64 - macos-12-arm64
steps: steps:
- uses: emqx/self-hosted-cleanup-action@v1.0.3
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ matrix.branch }} ref: ${{ matrix.branch }}

View File

@ -7,7 +7,7 @@ concurrency:
on: on:
workflow_call: workflow_call:
inputs: inputs:
runner: runner_labels:
required: true required: true
type: string type: string
builder: builder:
@ -27,10 +27,10 @@ on:
inputs: inputs:
ref: ref:
required: false required: false
runner: runner_labels:
required: false required: false
type: string type: string
default: 'ubuntu-22.04' default: '["self-hosted","ephemeral"]'
builder: builder:
required: false required: false
type: string type: string
@ -50,7 +50,7 @@ on:
jobs: jobs:
linux: linux:
runs-on: ${{ inputs.runner }} runs-on: ${{ fromJSON(inputs.runner_labels) }}
env: env:
EMQX_NAME: ${{ matrix.profile[0] }} EMQX_NAME: ${{ matrix.profile[0] }}
@ -64,7 +64,6 @@ jobs:
container: "ghcr.io/emqx/emqx-builder/${{ inputs.builder_vsn }}:${{ inputs.elixir_vsn }}-${{ matrix.profile[1] }}-${{ matrix.profile[2] }}" container: "ghcr.io/emqx/emqx-builder/${{ inputs.builder_vsn }}:${{ inputs.elixir_vsn }}-${{ matrix.profile[1] }}-${{ matrix.profile[2] }}"
steps: steps:
- uses: AutoModality/action-clean@v1
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0

View File

@ -3,7 +3,7 @@ name: Check integrity of rebar and mix dependencies
on: on:
workflow_call: workflow_call:
inputs: inputs:
runner: runner_labels:
required: true required: true
type: string type: string
builder: builder:
@ -12,7 +12,7 @@ on:
jobs: jobs:
check_deps_integrity: check_deps_integrity:
runs-on: ${{ inputs.runner }} runs-on: ${{ fromJSON(inputs.runner_labels) }}
container: ${{ inputs.builder }} container: ${{ inputs.builder }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View File

@ -10,8 +10,8 @@ on:
jobs: jobs:
rerun-failed-jobs: rerun-failed-jobs:
runs-on: ubuntu-22.04
if: github.repository_owner == 'emqx' if: github.repository_owner == 'emqx'
runs-on: ['self-hosted', 'linux', 'x64', 'ephemeral']
permissions: permissions:
checks: read checks: read
actions: write actions: write

View File

@ -7,7 +7,7 @@ concurrency:
on: on:
workflow_call: workflow_call:
inputs: inputs:
runner: runner_labels:
required: true required: true
type: string type: string
builder: builder:
@ -16,7 +16,7 @@ on:
jobs: jobs:
run_conf_tests: run_conf_tests:
runs-on: ${{ inputs.runner }} runs-on: ${{ fromJSON(inputs.runner_labels) }}
container: ${{ inputs.builder }} container: ${{ inputs.builder }}
env: env:
PROFILE: ${{ matrix.profile }} PROFILE: ${{ matrix.profile }}
@ -27,7 +27,6 @@ jobs:
- emqx - emqx
- emqx-enterprise - emqx-enterprise
steps: steps:
- uses: AutoModality/action-clean@v1
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
name: ${{ matrix.profile }} name: ${{ matrix.profile }}

View File

@ -7,7 +7,7 @@ concurrency:
on: on:
workflow_call: workflow_call:
inputs: inputs:
runner: runner_labels:
required: true required: true
type: string type: string
version-emqx: version-emqx:
@ -19,7 +19,7 @@ on:
jobs: jobs:
basic-tests: basic-tests:
runs-on: ${{ inputs.runner }} runs-on: ${{ fromJSON(inputs.runner_labels) }}
defaults: defaults:
run: run:
shell: bash shell: bash
@ -63,7 +63,7 @@ jobs:
docker compose rm -fs docker compose rm -fs
paho-mqtt-testing: paho-mqtt-testing:
runs-on: ${{ inputs.runner }} runs-on: ${{ fromJSON(inputs.runner_labels) }}
defaults: defaults:
run: run:
shell: bash shell: bash
@ -83,7 +83,6 @@ jobs:
- mnesia - mnesia
- rlog - rlog
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:
@ -110,9 +109,8 @@ jobs:
echo "DUMP_CONTAINER_LOGS_END" echo "DUMP_CONTAINER_LOGS_END"
exit 1 exit 1
fi fi
# node_dump requires netstat, which is not available in the container
# 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

View File

@ -10,7 +10,7 @@ concurrency:
on: on:
workflow_call: workflow_call:
inputs: inputs:
runner: runner_labels:
required: true required: true
type: string type: string
builder: builder:
@ -28,7 +28,7 @@ env:
jobs: jobs:
run_emqx_app_tests: run_emqx_app_tests:
runs-on: ${{ inputs.runner }} runs-on: ${{ fromJSON(inputs.runner_labels) }}
container: ${{ inputs.builder }} container: ${{ inputs.builder }}
defaults: defaults:
@ -61,5 +61,5 @@ jobs:
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
if: failure() if: failure()
with: with:
name: logs-${{ inputs.runner }} name: logs-emqx-app-tests
path: apps/emqx/_build/test/logs path: apps/emqx/_build/test/logs

View File

@ -7,6 +7,9 @@ concurrency:
on: on:
workflow_call: workflow_call:
inputs: inputs:
runner_labels:
required: true
type: string
version-emqx: version-emqx:
required: true required: true
type: string type: string
@ -16,7 +19,7 @@ on:
jobs: jobs:
helm_test: helm_test:
runs-on: ubuntu-22.04 runs-on: ${{ fromJSON(inputs.runner_labels) }}
defaults: defaults:
run: run:
shell: bash shell: bash

View File

@ -3,13 +3,16 @@ name: JMeter integration tests
on: on:
workflow_call: workflow_call:
inputs: inputs:
runner_labels:
required: true
type: string
version-emqx: version-emqx:
required: true required: true
type: string type: string
jobs: jobs:
jmeter_artifact: jmeter_artifact:
runs-on: ubuntu-22.04 runs-on: ${{ fromJSON(inputs.runner_labels) }}
steps: steps:
- name: Cache Jmeter - name: Cache Jmeter
id: cache-jmeter id: cache-jmeter
@ -38,7 +41,7 @@ jobs:
path: /tmp/apache-jmeter.tgz path: /tmp/apache-jmeter.tgz
advanced_feat: advanced_feat:
runs-on: ubuntu-22.04 runs-on: ${{ fromJSON(inputs.runner_labels) }}
strategy: strategy:
fail-fast: false fail-fast: false
@ -89,7 +92,7 @@ jobs:
path: ./jmeter_logs path: ./jmeter_logs
pgsql_authn_authz: pgsql_authn_authz:
runs-on: ubuntu-22.04 runs-on: ${{ fromJSON(inputs.runner_labels) }}
strategy: strategy:
fail-fast: false fail-fast: false
@ -155,7 +158,7 @@ jobs:
path: ./jmeter_logs path: ./jmeter_logs
mysql_authn_authz: mysql_authn_authz:
runs-on: ubuntu-22.04 runs-on: ${{ fromJSON(inputs.runner_labels) }}
strategy: strategy:
fail-fast: false fail-fast: false
@ -214,7 +217,7 @@ jobs:
path: ./jmeter_logs path: ./jmeter_logs
JWT_authn: JWT_authn:
runs-on: ubuntu-22.04 runs-on: ${{ fromJSON(inputs.runner_labels) }}
strategy: strategy:
fail-fast: false fail-fast: false
@ -265,7 +268,7 @@ jobs:
path: ./jmeter_logs path: ./jmeter_logs
built_in_database_authn_authz: built_in_database_authn_authz:
runs-on: ubuntu-22.04 runs-on: ${{ fromJSON(inputs.runner_labels) }}
strategy: strategy:
fail-fast: false fail-fast: false

View File

@ -16,7 +16,7 @@ on:
jobs: jobs:
relup_test_plan: relup_test_plan:
runs-on: ${{ inputs.runner }} runs-on: ["${{ inputs.runner }}", 'linux', 'x64', 'ephemeral']
container: ${{ inputs.builder }} container: ${{ inputs.builder }}
outputs: outputs:
CUR_EE_VSN: ${{ steps.find-versions.outputs.CUR_EE_VSN }} CUR_EE_VSN: ${{ steps.find-versions.outputs.CUR_EE_VSN }}
@ -25,7 +25,6 @@ jobs:
run: run:
shell: bash shell: bash
steps: steps:
- uses: AutoModality/action-clean@v1
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
name: emqx-enterprise name: emqx-enterprise
@ -60,7 +59,7 @@ jobs:
needs: needs:
- relup_test_plan - relup_test_plan
if: needs.relup_test_plan.outputs.OLD_VERSIONS != '[]' if: needs.relup_test_plan.outputs.OLD_VERSIONS != '[]'
runs-on: ubuntu-22.04 runs-on: ["${{ inputs.runner }}", 'linux', 'x64', 'ephemeral']
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:

View File

@ -7,7 +7,7 @@ concurrency:
on: on:
workflow_call: workflow_call:
inputs: inputs:
runner: runner_labels:
required: true required: true
type: string type: string
builder: builder:
@ -28,7 +28,7 @@ env:
jobs: jobs:
eunit_and_proper: eunit_and_proper:
runs-on: ${{ inputs.runner }} runs-on: ${{ fromJSON(inputs.runner_labels) }}
name: "eunit_and_proper (${{ matrix.profile }})" name: "eunit_and_proper (${{ matrix.profile }})"
strategy: strategy:
fail-fast: false fail-fast: false
@ -41,7 +41,6 @@ jobs:
container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu22.04" container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu22.04"
steps: steps:
- uses: AutoModality/action-clean@v1
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
name: ${{ matrix.profile }} name: ${{ matrix.profile }}
@ -69,7 +68,7 @@ jobs:
path: _build/test/cover path: _build/test/cover
ct_docker: ct_docker:
runs-on: ${{ inputs.runner }} runs-on: ${{ fromJSON(inputs.runner_labels) }}
name: "ct_docker (${{ matrix.app }}-${{ matrix.suitegroup }})" name: "ct_docker (${{ matrix.app }}-${{ matrix.suitegroup }})"
strategy: strategy:
fail-fast: false fail-fast: false
@ -81,7 +80,6 @@ jobs:
shell: bash shell: bash
steps: steps:
- uses: AutoModality/action-clean@v1
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
name: ${{ matrix.profile }} name: ${{ matrix.profile }}
@ -117,7 +115,7 @@ jobs:
path: _build/test/logs path: _build/test/logs
ct: ct:
runs-on: ${{ inputs.runner }} runs-on: ${{ fromJSON(inputs.runner_labels) }}
name: "ct (${{ matrix.app }}-${{ matrix.suitegroup }})" name: "ct (${{ matrix.app }}-${{ matrix.suitegroup }})"
strategy: strategy:
fail-fast: false fail-fast: false
@ -130,7 +128,6 @@ jobs:
shell: bash shell: bash
steps: steps:
- uses: AutoModality/action-clean@v1
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
name: ${{ matrix.profile }} name: ${{ matrix.profile }}
@ -163,7 +160,7 @@ jobs:
- eunit_and_proper - eunit_and_proper
- ct - ct
- ct_docker - ct_docker
runs-on: ${{ inputs.runner }} runs-on: ${{ fromJSON(inputs.runner_labels) }}
strategy: strategy:
fail-fast: false fail-fast: false
steps: steps:
@ -174,7 +171,7 @@ jobs:
- eunit_and_proper - eunit_and_proper
- ct - ct
- ct_docker - ct_docker
runs-on: ${{ inputs.runner }} runs-on: ${{ fromJSON(inputs.runner_labels) }}
container: ${{ inputs.builder }} container: ${{ inputs.builder }}
strategy: strategy:
fail-fast: false fail-fast: false
@ -182,7 +179,6 @@ jobs:
profile: profile:
- emqx-enterprise - emqx-enterprise
steps: steps:
- uses: AutoModality/action-clean@v1
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
name: ${{ matrix.profile }} name: ${{ matrix.profile }}
@ -215,7 +211,7 @@ jobs:
# do this in a separate job # do this in a separate job
upload_coverdata: upload_coverdata:
needs: make_cover needs: make_cover
runs-on: ${{ inputs.runner }} runs-on: ${{ fromJSON(inputs.runner_labels) }}
steps: steps:
- name: Coveralls Finished - name: Coveralls Finished
env: env:

View File

@ -7,7 +7,7 @@ concurrency:
on: on:
workflow_call: workflow_call:
inputs: inputs:
runner: runner_labels:
required: true required: true
type: string type: string
@ -18,7 +18,7 @@ jobs:
profile: profile:
- emqx - emqx
- emqx-enterprise - emqx-enterprise
runs-on: ${{ inputs.runner }} runs-on: ${{ fromJSON(inputs.runner_labels) }}
steps: steps:
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:

View File

@ -10,8 +10,8 @@ on:
jobs: jobs:
stale: stale:
runs-on: ubuntu-22.04
if: github.repository_owner == 'emqx' if: github.repository_owner == 'emqx'
runs-on: ['self-hosted', 'linux', 'x64', 'ephemeral']
permissions: permissions:
issues: write issues: write
pull-requests: none pull-requests: none

View File

@ -7,7 +7,7 @@ concurrency:
on: on:
workflow_call: workflow_call:
inputs: inputs:
runner: runner_labels:
required: true required: true
type: string type: string
builder: builder:
@ -22,7 +22,7 @@ env:
jobs: jobs:
static_checks: static_checks:
runs-on: ${{ inputs.runner }} runs-on: ${{ fromJSON(inputs.runner_labels) }}
name: "static_checks (${{ matrix.profile }})" name: "static_checks (${{ matrix.profile }})"
strategy: strategy:
fail-fast: false fail-fast: false
@ -30,7 +30,6 @@ jobs:
include: ${{ fromJson(inputs.ct-matrix) }} include: ${{ fromJson(inputs.ct-matrix) }}
container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu22.04" container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu22.04"
steps: steps:
- uses: AutoModality/action-clean@v1
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
name: ${{ matrix.profile }} name: ${{ matrix.profile }}