Allow KafkaRoller connect to controllers #262
This file contains hidden or 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: System Tests | |
on: | |
# Trigger for manual execution from GitHub UI | |
workflow_dispatch: | |
inputs: | |
releaseVersion: | |
description: "Release version to test (i.e. 'latest', '0.46.0')" | |
required: false | |
default: "latest" | |
kafkaVersion: | |
description: "Kafka version. e.g. '4.0.0' or 'latest'" | |
required: false | |
default: "latest" | |
profile: | |
description: "Comma-separated or single profile name(s)" | |
required: false | |
default: "" | |
type: string | |
# Automated trigger for issue comment | |
issue_comment: | |
types: [created] | |
# Testing trigger for PRs - tests workflow changes | |
pull_request: | |
types: [opened, synchronize] | |
paths: | |
- '.github/workflows/run-system-tests.yml' | |
- '.github/workflows/system-tests.yml' | |
permissions: | |
contents: read | |
jobs: | |
# Parse and build parameters from comment or from workflow params | |
parse-params: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
statuses: write | |
outputs: | |
pipelineList: ${{ steps.parse.outputs.pipelineList }} | |
profileList: ${{ steps.parse.outputs.profileList }} | |
agent: ${{ steps.parse.outputs.agent }} | |
architecture: ${{ steps.parse.outputs.architecture }} | |
strimzi_feature_gates: ${{ steps.parse.outputs.strimzi_feature_gates }} | |
strimzi_rbac_scope: ${{ steps.parse.outputs.strimzi_rbac_scope }} | |
cluster_operator_install_type: ${{ steps.parse.outputs.cluster_operator_install_type }} | |
groups: ${{ steps.parse.outputs.groups }} | |
tests: ${{ steps.parse.outputs.tests }} | |
kafkaVersion: ${{ steps.parse.outputs.kafkaVersion }} | |
releaseVersion: ${{ steps.parse.outputs.releaseVersion }} | |
parallel: ${{ steps.parse.outputs.parallel }} | |
shouldRun: ${{ steps.parse.outputs.shouldRun }} | |
kubeVersion: ${{ steps.parse.outputs.kubeVersion }} | |
ref: ${{ steps.determine_ref.outputs.ref }} | |
sha: ${{ steps.determine_ref.outputs.sha }} | |
steps: | |
- name: Determine checkout ref | |
id: determine_ref | |
uses: strimzi/strimzi-kafka-operator/.github/actions/utils/determine-ref@main | |
- uses: actions/checkout@v5 | |
with: | |
ref: ${{ steps.determine_ref.outputs.ref }} | |
# TODO - think about this how to handle it after check-rights | |
- name: Parse Comment | |
id: parse | |
uses: ./.github/actions/systemtests/parse-comment | |
with: | |
# Parameters from manual trigger via UI | |
releaseVersion: ${{ github.event.inputs.releaseVersion }} | |
kafkaVersion: ${{ github.event.inputs.kafkaVersion }} | |
profile: ${{ github.event.inputs.profile }} | |
check-rights: | |
needs: | |
- parse-params | |
if: ${{ needs.parse-params.outputs.shouldRun == 'true' && github.event_name != 'pull_request' }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
statuses: write | |
steps: | |
- uses: strimzi/strimzi-kafka-operator/.github/actions/utils/check-permissions@main | |
# In case the user has proper rights, print comment with build link and set status | |
- uses: actions/checkout@v5 | |
with: | |
ref: ${{ needs.parse-params.outputs.ref }} | |
- name: Add comment | |
uses: ./.github/actions/utils/add-comment | |
with: | |
commentMessage: ':hourglass_flowing_sand: System test verification started: [link](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})' | |
- name: Set check & commit status (pending) | |
if: ${{ needs.parse-params.outputs.shouldRun == 'true' }} | |
uses: ./.github/actions/utils/check-and-status | |
with: | |
checkState: pending | |
checkName: "System tests verification" | |
checkDescription: "Check for overall system test verification" | |
build-artifacts: | |
name: build-artifacts | |
needs: | |
- parse-params | |
- check-rights | |
# Run only if properly triggered, permissions check passed, and the run is not for release (already built images) | |
if: ${{ always() && needs.parse-params.outputs.shouldRun == 'true' && (needs.check-rights.result == 'success' || github.event_name == 'pull_request') && needs.parse-params.outputs.releaseVersion == 'latest' }} | |
runs-on: oracle-2cpu-8gb-arm64 | |
steps: | |
- uses: actions/checkout@v5 | |
with: | |
ref: ${{ needs.parse-params.outputs.ref }} | |
- uses: ./.github/actions/build/build-strimzi-binaries | |
with: | |
mvnArgs: "-B -DskipTests -Dmaven.javadoc.skip=true" | |
runnerArch: "arm64" | |
build-images: | |
name: build-images | |
needs: | |
- parse-params | |
- check-rights | |
- build-artifacts | |
# Run only if properly triggered, permissions check passed, and the run is not for release (already built images) | |
if: ${{ always() && needs.parse-params.outputs.shouldRun == 'true' && (needs.check-rights.result == 'success' || github.event_name == 'pull_request') && needs.parse-params.outputs.releaseVersion == 'latest' && needs.build-artifacts.result != 'failure'}} | |
strategy: | |
matrix: | |
architecture: [amd64, arm64] | |
runs-on: oracle-vm-2cpu-8gb-arm64 | |
steps: | |
- uses: actions/checkout@v5 | |
with: | |
ref: ${{ needs.parse-params.outputs.ref }} | |
- uses: ./.github/actions/build/containers-build | |
with: | |
architecture: ${{ matrix.architecture }} | |
runnerArch: "arm64" | |
run-tests: | |
name: run-tests | |
needs: | |
- parse-params | |
- check-rights | |
- build-artifacts | |
- build-images | |
# Run if properly triggered, permissions check passed, and build jobs succeeded or were skipped | |
if: ${{ always() && needs.parse-params.outputs.shouldRun == 'true' && (needs.check-rights.result == 'success' || github.event_name == 'pull_request') && needs.build-images.result != 'failure' && needs.build-artifacts.result != 'failure' }} | |
# Job needs write rights for setting statuses on pull-requests | |
permissions: | |
contents: read | |
pull-requests: write | |
statuses: write | |
uses: ./.github/workflows/run-system-tests.yml | |
with: | |
pipelineList: ${{ needs.parse-params.outputs.pipelineList }} | |
profileList: ${{ needs.parse-params.outputs.profileList }} | |
agent: ${{ needs.parse-params.outputs.agent }} | |
architecture: ${{ needs.parse-params.outputs.architecture }} | |
strimzi_feature_gates: ${{ needs.parse-params.outputs.strimzi_feature_gates }} | |
strimzi_rbac_scope: ${{ needs.parse-params.outputs.strimzi_rbac_scope }} | |
cluster_operator_install_type: ${{ needs.parse-params.outputs.cluster_operator_install_type }} | |
parallel: ${{ needs.parse-params.outputs.parallel }} | |
releaseVersion: ${{ needs.parse-params.outputs.releaseVersion }} | |
kafkaVersion: ${{ needs.parse-params.outputs.kafkaVersion }} | |
kubeVersion: ${{ needs.parse-params.outputs.kubeVersion }} | |
# Checkout ref params | |
ref: ${{ needs.parse-params.outputs.ref }} | |
report: | |
needs: | |
- parse-params | |
- check-rights | |
- run-tests | |
if: ${{ always() && needs.parse-params.outputs.shouldRun == 'true' && needs.check-rights.result == 'success' && github.event_name != 'pull_request' }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
statuses: write | |
steps: | |
- uses: actions/checkout@v5 | |
with: | |
ref: ${{ needs.parse-params.outputs.ref }} | |
- name: Add comment | |
uses: ./.github/actions/utils/add-comment | |
with: | |
commentMessage: | | |
${{ | |
(needs.run-tests.result == 'success' && ':tada: System test verification **passed**') || | |
(needs.run-tests.result == 'failure' && ':x: System test verification **failed**') || | |
':warning: System test verification **skipped**' | |
}}: [link](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) | |
- name: Set check & commit status | |
uses: ./.github/actions/utils/check-and-status | |
with: | |
checkState: ${{ needs.run-tests.result == 'skipped' && 'neutral' || needs.run-tests.result }} | |
checkName: "System tests verification" | |
checkDescription: "Check for overall system test verification" |