Skip to content

PoC of system tests pipeline on GitHub Actions #302

PoC of system tests pipeline on GitHub Actions

PoC of system tests pipeline on GitHub Actions #302

Workflow file for this run

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]
# TODO - Remove this once tested and ready for merge
pull_request:
jobs:
# Parse and build parameters from comment or from workflow params
parse-params:
# TODO - maybe use quick github runners?
runs-on: oracle-2cpu-8gb-arm64
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 }}
parallel: ${{ steps.parse.outputs.parallel }}
groups: ${{ steps.parse.outputs.groups }}
tests: ${{ steps.parse.outputs.tests }}
kafkaVersion: ${{ steps.parse.outputs.kafkaVersion }}
releaseVersion: ${{ steps.parse.outputs.releaseVersion }}
shouldRun: ${{ steps.parse.outputs.shouldRun }}
kubeVersion: ${{ steps.parse.outputs.kubeVersion }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Parse Comment
id: parse
uses: ./.github/actions/parse-comment
with:
# Parameters from manual trigger via UI
releaseVersion: ${{ github.event.inputs.releaseVersion }}
kafkaVersion: ${{ github.event.inputs.kafkaVersion }}
profile: ${{ github.event.inputs.profile }}
build-artifacts:
name: build-artifacts
needs:
- parse-params
# Run only if properly triggered and the run is not for release (already built images)
if: ${{ needs.parse-params.outputs.shouldRun == 'true' && needs.parse-params.outputs.releaseVersion == 'latest' }}
runs-on: oracle-2cpu-8gb-arm64
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/build-strimzi-binaries
with:
mvnArgs: "-B -DskipTests -Dmaven.javadoc.skip=true"
build-images:
name: build-images
needs:
- parse-params
- build-artifacts
# Run only if properly triggered and the run is not for release (already built images)
if: ${{ needs.parse-params.outputs.shouldRun == 'true' && 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@v4
with:
fetch-depth: 0
- uses: ./.github/actions/containers-build
with:
architecture: ${{ matrix.architecture }}
run-tests:
name: run
needs:
- parse-params
- build-images
# Run if properly triggered and build-images job was either succeeded or skipped
if: ${{ always() && needs.parse-params.outputs.shouldRun == 'true' && needs.build-images.result != 'failure' }}
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 }}