Add ServiceMonitor resources for both HiveMQ Platform Operator Helm charts and HiveMQ Platform Helm charts #1030
Workflow file for this run
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 Operator (Legacy) Integration Tests | |
on: | |
pull_request: | |
branches: | |
- "**" | |
workflow_dispatch: | |
concurrency: | |
group: hivemq-operator-legacy-integration-test-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
legacy-integration-test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 25 | |
permissions: | |
contents: read | |
packages: write | |
strategy: | |
fail-fast: false | |
matrix: | |
test-plan: [ | |
Extensions, | |
K8sVersionCompatibility, | |
RollingUpgrades, | |
Other | |
] | |
steps: | |
- name: Checkout HiveMQ Helm Charts | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
path: helm-charts | |
- name: Set up Docker QEMU | |
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3 | |
- name: Login to Container Registry | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Checkout HiveMQ Operator (legacy) 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 Operator (legacy) 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: Set up JDK 21 | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Set up Gradle | |
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4 | |
with: | |
gradle-home-cache-includes: | | |
caches | |
notifications | |
jdks | |
- name: Run HiveMQ Operator (legacy) integration tests | |
env: | |
TEST_PLAN: ${{ matrix.test-plan }} | |
working-directory: helm-charts | |
run: ./gradlew :tests-hivemq-operator:integrationTest | |
- name: Upload HiveMQ Operator (legacy) test results | |
if: always() | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 | |
with: | |
name: Test results HiveMQ Operator (legacy) ${{ matrix.test-plan }} | |
path: | | |
helm-charts/tests-hivemq-operator/build/reports/tests/integrationTest/ | |
helm-charts/tests-hivemq-operator/build/test-results/integrationTest/*.xml | |
retention-days: 5 | |
- name: Publish test report | |
uses: mikepenz/action-junit-report@a427a90771729d8f85b6ab0cdaa1a5929cab985d # v5 | |
if: always() | |
with: | |
annotate_only: true | |
detailed_summary: true | |
job_name: legacy-integration-test-report | |
report_paths: '**/build/test-results/integrationTest/TEST-*.xml' |