Skip to content

Release HiveMQ Platform Operator 1.4.0 #589

Release HiveMQ Platform Operator 1.4.0

Release HiveMQ Platform Operator 1.4.0 #589

name: HiveMQ Platform Operator Integration Tests
on:
pull_request:
branches:
- "**"
workflow_dispatch:
concurrency:
group: hivemq-operator-platform-integration-test-${{ github.ref }}
cancel-in-progress: true
jobs:
platform-integration-test-compose:
runs-on: ubuntu-latest
timeout-minutes: 25
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
test-plan: [ Upgrade, Extensions, PodSecurityContext, Other ]
steps:
- name: Checkout HiveMQ Helm Charts
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
path: helm-charts
- name: Set up Docker QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3
- name: Login to Container Registry
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Checkout HiveMQ Platform Operator on the default branch
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
repository: hivemq/hivemq-platform-operator
token: ${{ secrets.JENKINS_GITHUB_TOKEN }}
path: hivemq-platform-operator
- name: Checkout HiveMQ Platform Operator on the same or target branch
working-directory: ${{ github.workspace }}/hivemq-platform-operator
run: |
echo "Checking if branch \"${GITHUB_HEAD_REF}\" exists on hivemq-platform-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-platform-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: Set up JDK 21
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4
with:
java-version: '21'
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3
with:
gradle-home-cache-includes: |
caches
notifications
jdks
gradle-home-cache-cleanup: true
- name: Run HiveMQ Platform Operator integration tests
env:
TEST_PLAN: ${{ matrix.test-plan }}
working-directory: helm-charts
run: ./gradlew :tests-hivemq-platform-operator:integrationTest --tests "*.compose.*"
- name: Upload HiveMQ Platform Operator test results
if: always()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
with:
name: Test results HiveMQ Platform Operator - Compose ${{ matrix.test-plan }}
path: |
helm-charts/tests-hivemq-platform-operator/build/reports/tests/integrationTest/
helm-charts/tests-hivemq-platform-operator/build/test-results/integrationTest/*.xml
retention-days: 5
platform-integration-test-single:
runs-on: ubuntu-latest
timeout-minutes: 25
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
test-plan: [ CustomConfig, Containers, Volumes, Services1, Services2, Platform, PodSecurityContext, Other ]
steps:
- name: Checkout HiveMQ Platform Helm Charts
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
path: helm-charts
- name: Set up Docker QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3
- name: Login to Container Registry
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Checkout HiveMQ Platform Operator on the default branch
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
repository: hivemq/hivemq-platform-operator
token: ${{ secrets.JENKINS_GITHUB_TOKEN }}
path: hivemq-platform-operator
- name: Checkout HiveMQ Platform Operator on the same or target branch
working-directory: ${{ github.workspace }}/hivemq-platform-operator
run: |
echo "Checking if branch \"${GITHUB_HEAD_REF}\" exists on hivemq-platform-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-platform-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: Set up JDK 11
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4
with:
java-version: '21'
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3
with:
gradle-home-cache-includes: |
caches
notifications
jdks
gradle-home-cache-cleanup: true
- name: Run HiveMQ Platform Operator integration tests
env:
TEST_PLAN: ${{ matrix.test-plan }}
working-directory: helm-charts
run: ./gradlew :tests-hivemq-platform-operator:integrationTest --tests "*.single.*"
- name: Upload HiveMQ Platform Operator test results
if: always()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
with:
name: Test results HiveMQ Platform Operator - Single ${{ matrix.test-plan }}
path: |
helm-charts/tests-hivemq-platform-operator/build/reports/tests/integrationTest/
helm-charts/tests-hivemq-platform-operator/build/test-results/integrationTest/*.xml
retention-days: 5