Skip to content

Update registry.access.redhat.com/ubi9/ubi-minimal Docker tag to v9.7… #116

Update registry.access.redhat.com/ubi9/ubi-minimal Docker tag to v9.7…

Update registry.access.redhat.com/ubi9/ubi-minimal Docker tag to v9.7… #116

#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: System Tests for Main branch
on:
push:
paths-ignore:
- '**/**.md'
- '**/**.txt'
- '.github/**'
- '!.github/workflows/system-tests-merge.yaml'
- '!.github/workflows/run-system-tests.yaml'
- '!.github/workflows/build-kroxylicious-container-images.yaml'
- '!.github/actions/**'
- 'kroxylicious-docs**/**'
- 'kroxylicious-integration-test**/**'
- 'kroxylicious-*benchmarks/**'
branches:
- "main"
workflow_dispatch:
jobs:
build_images:
uses: ./.github/workflows/build-kroxylicious-container-images.yaml
# First we run the tests that are independent of the KAFKA_CLIENT selected
run_external_kafka_client_and_operator_system_tests:
needs: build_images
uses: ./.github/workflows/run-system-tests.yaml
with:
groups: 'externalKafkaClients,operator'
discover_system_test_clients:
needs: build_images
runs-on: ubuntu-latest
outputs:
test_clients: ${{ steps.discover.outputs.test_clients }}
steps:
- name: 'Check out repository'
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 0
- name: 'Discover STs'
working-directory: kroxylicious-systemtests
id: discover
run: |
client_types=$(grep -oE '^\s+[A-Z][A-Z0-9_]+' ./src/main/java/io/kroxylicious/systemtests/enums/KafkaClientType.java \
| tr -d ' ' \
| tr '[:upper:]' '[:lower:]' \
| paste -sd ',')
TEST_CLIENTS="[$(echo "$client_types" | sed 's/[^,]*/"&"/g')]"
echo "test_clients=$TEST_CLIENTS" >> $GITHUB_OUTPUT
# Then we run the tests that with the KAFKA_CLIENT selected
run_system_tests:
needs: discover_system_test_clients
uses: ./.github/workflows/run-system-tests.yaml
with:
kafkaClient: ${{ matrix.tests }}
excludedGroups: 'externalKafkaClients,operator'
testFortanixKMS: 'true'
strategy:
fail-fast: false
matrix:
tests: ${{ fromJson(needs.discover_system_test_clients.outputs.test_clients) }}
system_tests_proxy:
runs-on: ubuntu-latest
needs: [run_system_tests, run_external_kafka_client_and_operator_system_tests]
if: always()
permissions:
actions: read
steps:
- name: 'Check all matrix builds'
env:
GH_TOKEN: ${{ github.token }}
run: |
FAILED_JSON=$(gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs \
--jq '.jobs[] | select(.conclusion=="failure") | {name: .name, url: .html_url}')
if [ -z "$FAILED_JSON" ]; then
echo "All jobs passed!" >> $GITHUB_STEP_SUMMARY
echo "No failures detected."
exit 0
fi
echo "Failed Matrix Jobs" >> $GITHUB_STEP_SUMMARY
echo "The following instances failed:"
echo "$FAILED_JSON" | jq -r '"* [\(.name)](\(.url))"' >> $GITHUB_STEP_SUMMARY
echo "$FAILED_JSON" | jq -r '"\(.name): \(.url)"'
exit 1
- name: Slack Notification on Failure
if: failure() && env.SLACK_WEBHOOK_SET == 'true' && github.event_name == 'push'
uses: ./.github/actions/common/slack-notification
with:
slackWebhook: ${{ secrets.KROXYLICIOUS_SLACK_WEBHOOK }}
slackTitle: 'Failure Alert: ${{ github.repository }}'
slackMessage: 'The system tests workflow failed on branch ${{ github.ref_name }}.'