Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/build/build-binaries/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ runs:
#############################################################
- name: Run tests and verification
# Tests for operators repo are in separated workflow and this is just a redundant step
if: ${{ inputs.clusterOperatorBuild == 'true' }}
if: ${{ inputs.clusterOperatorBuild != 'true' }}
shell: bash
run: |
make java_install
Expand Down
29 changes: 27 additions & 2 deletions .github/workflows/reusable-test-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ on:
description: "Flag whether it is Strimzi Operator build or not (should be set only in Strimzi Kafka Operator repo)"
required: false
type: boolean
checkTests:
description: "Flag whether unit tests should be run and verified during build (set to false for repos without tests)"
required: false
type: boolean
default: true
githubActionsRef:
description: "Ref of strimzi/github-actions to use (tag, branch, or SHA). Leave empty for local calls within github-actions repo."
required: false
Expand Down Expand Up @@ -107,8 +112,8 @@ jobs:
artifactSuffix: ${{ inputs.artifactSuffix }}
clusterOperatorBuild: ${{ inputs.clusterOperatorBuild }}
env:
# Always skipTests during testing of the actions to save time
MVN_ARGS: "-B -DskipTests"
# Skip just ITs and rerun unit tests in case of flakes
MVN_ARGS: "-DskipITs -Dsurefire.rerunFailingTestsCount=5"

- name: Verify binaries artifact was created
run: |
Expand All @@ -121,6 +126,17 @@ jobs:
tar -tf binaries-${{ inputs.artifactSuffix }}.tar
echo "✓ Binaries artifact created successfully"

- name: Verify test results exist
if: ${{ inputs.checkTests == true }}
shell: bash
run: |
REPORT_COUNT=$(find . -path "*/surefire-reports/TEST-*.xml" -type f | wc -l)
if [ "$REPORT_COUNT" -eq 0 ]; then
echo "No surefire test reports found - unit tests may not have run"
exit 1
fi
echo "✓ Found $REPORT_COUNT surefire test report(s)"

test-deploy-java:
name: Deploy to Maven
if: ${{ inputs.modules != 'none' }}
Expand Down Expand Up @@ -184,6 +200,15 @@ jobs:
- name: Install yq
uses: ./.github/actions/dependencies/install-yq

# The central-publishing-maven-plugin creates a bundle zip for release versions
# and uploads via the Central Portal API, which local Nexus doesn't support.
# Setting a SNAPSHOT version forces direct artifact deployment instead.
# This is required for projects where we use release branches, and it is used only for testing purposes.
- name: Set SNAPSHOT version for testing
shell: bash
run: |
mvn versions:set -DnewVersion=${{ inputs.releaseVersion }}-SNAPSHOT -DgenerateBackupPoms=false

- name: Deploy to local Maven repository using deploy-java action
uses: ./.github/actions/build/deploy-java
with:
Expand Down
33 changes: 30 additions & 3 deletions .github/workflows/test-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
project:
# Strimzi Operator - Full pipeline with containers and Helm
- repo: "strimzi/strimzi-kafka-operator"
ref: "main"
ref: "release-0.51.x"
artifactSuffix: "operators"
architecture: "amd64"
buildContainers: true
Expand All @@ -39,10 +39,11 @@ jobs:
releaseVersion: "6.6.6"
imagesDir: "./docker-images/container-archives"
clusterOperatorBuild: true
checkTests: false

# Kafka Bridge - Full pipeline with containers
- repo: "strimzi/strimzi-kafka-bridge"
ref: "main"
ref: "release-1.0.x"
artifactSuffix: "kafka-bridge"
architecture: "amd64"
buildContainers: true
Expand All @@ -53,6 +54,7 @@ jobs:
releaseVersion: "6.6.6-rc1"
imagesDir: "kafka-bridge-amd64.tar.gz"
clusterOperatorBuild: false
checkTests: true

# Access Operator - Full pipeline with containers
- repo: "strimzi/kafka-access-operator"
Expand All @@ -67,6 +69,7 @@ jobs:
releaseVersion: "6.6.6"
imagesDir: "access-operator-container-amd64.tar.gz"
clusterOperatorBuild: false
checkTests: true

# MQTT Bridge - Full pipeline with containers
- repo: "strimzi/strimzi-mqtt-bridge"
Expand All @@ -81,6 +84,7 @@ jobs:
releaseVersion: "6.6.6"
imagesDir: "mqtt-bridge-amd64.tar.gz"
clusterOperatorBuild: false
checkTests: true

# Drain Cleaner - Full pipeline with containers and Helm
- repo: "strimzi/drain-cleaner"
Expand All @@ -95,8 +99,9 @@ jobs:
releaseVersion: "6.6.6"
imagesDir: "drain-cleaner-container-amd64.tar.gz"
clusterOperatorBuild: false
checkTests: true

# Client Examples - Containers only (no Maven deploy)
# Client Examples - Containers only (no Maven deploy, no tests)
- repo: "strimzi/client-examples"
ref: "main"
artifactSuffix: "client-examples"
Expand All @@ -109,6 +114,7 @@ jobs:
releaseVersion: "none"
imagesDir: "*-amd64.tar.gz"
clusterOperatorBuild: false
checkTests: false

# Test Clients - Containers only (no Maven deploy)
- repo: "strimzi/test-clients"
Expand All @@ -123,6 +129,7 @@ jobs:
releaseVersion: "6.6.6"
imagesDir: "./docker-images/container-archives"
clusterOperatorBuild: false
checkTests: true

# Metrics Reporter - Java only (no containers)
- repo: "strimzi/metrics-reporter"
Expand All @@ -137,6 +144,7 @@ jobs:
releaseVersion: "6.6.6"
imagesDir: "none"
clusterOperatorBuild: false
checkTests: true

# Kafka Quotas Plugin - Java only (no containers)
- repo: "strimzi/kafka-quotas-plugin"
Expand All @@ -151,6 +159,7 @@ jobs:
releaseVersion: "6.6.6"
imagesDir: "none"
clusterOperatorBuild: false
checkTests: true

# Kafka Kubernetes Config Provider - Java only (no containers)
- repo: "strimzi/kafka-kubernetes-config-provider"
Expand All @@ -165,6 +174,7 @@ jobs:
releaseVersion: "6.6.6"
imagesDir: "none"
clusterOperatorBuild: false
checkTests: true

# Kafka OAuth - Java only (no containers)
- repo: "strimzi/strimzi-kafka-oauth"
Expand All @@ -179,6 +189,22 @@ jobs:
releaseVersion: "6.6.6"
imagesDir: "none"
clusterOperatorBuild: false
checkTests: true

# Test Container - Java only (no containers)
- repo: "strimzi/test-container"
ref: "main"
artifactSuffix: "strimzi-test-container"
architecture: "amd64"
buildContainers: false
modules: "./"
nexusCheck: "strimzi-test-container"
javaVersion: "17"
helmChartName: "none"
releaseVersion: "6.6.6"
imagesDir: "none"
clusterOperatorBuild: false
checkTests: true

uses: ./.github/workflows/reusable-test-integrations.yml
with:
Expand All @@ -194,4 +220,5 @@ jobs:
releaseVersion: ${{ matrix.project.releaseVersion }}
imagesDir: ${{ matrix.project.imagesDir }}
clusterOperatorBuild: ${{ matrix.project.clusterOperatorBuild }}
checkTests: ${{ matrix.project.checkTests }}
secrets: inherit
Loading