Release HiveMQ Platform Operator 1.7.0 #1373
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: HiveMQ Legacy Operator Integration Tests | |
on: | |
pull_request: | |
branches: | |
- "**" | |
workflow_dispatch: | |
concurrency: | |
group: hivemq-operator-legacy-integration-test-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
check-prefix: "Legacy Test #" | |
split-total: 2 | |
jobs: | |
generate-split-index-json: | |
name: Generate split indexes | |
runs-on: ubuntu-latest | |
outputs: | |
json: ${{ steps.generate.outputs.split-index-json }} | |
steps: | |
- name: Generate split index list | |
id: generate | |
uses: donnerbart/split-tests-java-action/generate-split-index-json@52df899b627fca5cd7cedd49a5c34313415a6711 # v1 | |
with: | |
split-total: ${{ env.split-total }} | |
legacy-integration-test: | |
name: "Legacy Test #${{ matrix.split-index }} (${{ matrix.k8s-version-type }})" | |
runs-on: ubuntu-latest | |
needs: | |
- generate-split-index-json | |
timeout-minutes: 25 | |
permissions: | |
contents: read | |
checks: write | |
strategy: | |
fail-fast: false | |
matrix: | |
split-index: ${{ fromjson(needs.generate-split-index-json.outputs.json) }} | |
k8s-version-type: [ | |
MINIMUM, | |
LATEST | |
] | |
steps: | |
- name: Checkout HiveMQ Helm Charts | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
path: helm-charts | |
- name: Checkout HiveMQ Legacy Operator on the default branch | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
repository: hivemq/hivemq-operator | |
token: ${{ secrets.JENKINS_GITHUB_TOKEN }} | |
path: hivemq-operator | |
- name: Checkout HiveMQ Legacy Operator on the same or target branch | |
working-directory: ${{ github.workspace }}/hivemq-operator | |
run: | | |
echo "Checking if branch \"${GITHUB_HEAD_REF}\" exists on hivemq-operator" | |
BRANCH=$(git ls-remote origin ${GITHUB_HEAD_REF}) | |
if [[ -n "${BRANCH}" ]]; then | |
echo "Checking out branch with the same name" | |
git fetch --all | |
git checkout origin/${GITHUB_HEAD_REF} | |
exit | |
fi | |
if [[ "${GITHUB_BASE_REF}" == "master" ]]; then | |
exit | |
fi | |
echo "Checking if branch \"${GITHUB_BASE_REF}\" exists on hivemq-operator" | |
BRANCH=$(git ls-remote origin ${GITHUB_BASE_REF}) | |
if [[ -n "${BRANCH}" ]]; then | |
echo "Checking out target branch" | |
git fetch --all | |
git checkout origin/${GITHUB_BASE_REF} | |
fi | |
- name: Checkout JUnit reports | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
path: junit-reports | |
ref: junit-reports/legacy/${{ github.base_ref }} | |
continue-on-error: true | |
- name: Set up Docker QEMU | |
uses: docker/setup-qemu-action@4574d27a4764455b42196d70a065bc6853246a25 # v3 | |
- name: Login to Container Registry | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Set up JDK 21 | |
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4 | |
with: | |
distribution: temurin | |
java-version: 21 | |
- name: Set up Gradle | |
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4 | |
with: | |
gradle-home-cache-includes: | | |
caches | |
notifications | |
jdks | |
- name: Split tests | |
id: split-tests | |
uses: donnerbart/split-tests-java-action@52df899b627fca5cd7cedd49a5c34313415a6711 # v1 | |
with: | |
split-index: ${{ matrix.split-index }} | |
split-total: ${{ env.split-total }} | |
glob: '**/helm-charts/tests-hivemq-operator/**/*IT.java' | |
junit-glob: '**/junit-reports/*.xml' | |
format: 'gradle' | |
average-time: true | |
debug: true | |
- name: Run HiveMQ Legacy Operator integration tests | |
working-directory: helm-charts | |
env: | |
K8S_VERSION_TYPE: ${{ matrix.k8s-version-type }} | |
run: ./gradlew :tests-hivemq-operator:integrationTest ${{ steps.split-tests.outputs.test-suite }} | |
- name: Upload HiveMQ Legacy Operator test results | |
if: always() | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 | |
with: | |
name: "Test results HiveMQ Legacy Operator #${{ matrix.split-index }} (${{ matrix.k8s-version-type }})" | |
path: | | |
helm-charts/tests-hivemq-operator/build/reports/tests/integrationTest/ | |
helm-charts/tests-hivemq-operator/build/test-results/integrationTest/*.xml | |
retention-days: 5 | |
- name: Upload JUnit report artifact | |
if: ${{ matrix.k8s-version-type == 'LATEST' }} | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 | |
with: | |
name: junit-xml-reports-${{ matrix.split-index }} | |
path: | | |
helm-charts/tests-hivemq-operator/build/test-results/integrationTest/*.xml | |
- name: Publish test report | |
uses: mikepenz/action-junit-report@ee6b445351cd81e2f73a16a0e52d598aeac2197f # v5 | |
if: always() | |
with: | |
annotate_only: true | |
detailed_summary: true | |
job_name: legacy-integration-test-report | |
report_paths: '**/build/test-results/integrationTest/TEST-*.xml' | |
merge-junit-reports: | |
name: Merge JUnit reports | |
runs-on: ubuntu-latest | |
needs: | |
- legacy-integration-test | |
permissions: | |
contents: write | |
steps: | |
- name: Merge JUnit reports | |
uses: donnerbart/split-tests-java-action/merge-junit-reports@52df899b627fca5cd7cedd49a5c34313415a6711 # v1 | |
with: | |
git-branch: junit-reports/legacy/${{ github.base_ref }} | |
artifact-name: junit-xml-reports-${{ github.base_ref }} | |
split-artifact-pattern: junit-xml-reports-* |