PoC of system tests pipeline on GitHub Actions #249
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 | |
# TODO - this works only if the workflow is commited in main | |
issue_comment: | |
types: [created] | |
pull_request: | |
## Global config for DNS resolver | |
#env: | |
# RES_OPTIONS: "ndots:2 edns0 trust-ad" | |
jobs: | |
# TODO - this cannot me used now as we do not have workflow in main branch! | |
# Check if the comment contains "/ga run" at all. | |
# If not, don't even bother with parse-params job. | |
parse-params: | |
# if: contains(github.event.comment.body, '/ga run') | |
# runs-on: oracle-4cpu-16gb-x86-64 | |
runs-on: oracle-2cpu-8gb-arm64 | |
outputs: | |
runTests: ${{ steps.parse.outputs.runTests }} | |
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 }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Parse Comment | |
id: parse | |
uses: ./.github/actions/parse-comment-config | |
with: | |
# TODO - revert this | |
# commentBody: ${{ github.event.comment.body }} | |
commentBody: "/ga run pipeline=smoke" | |
# debug-kind: | |
# name: debug-kind | |
# needs: parse-params | |
# if: ${{ needs.parse-params.outputs.runTests == 'true' }} | |
# runs-on: oracle-vm-2cpu-8gb-x86-64 | |
# steps: | |
# - uses: actions/checkout@v4 | |
# with: | |
# fetch-depth: 0 | |
# - name: DEBUG - dns utils | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install -y dnsutils iproute2 | |
# | |
# - name: Install Docker | |
# uses: ./.github/actions/install-docker | |
# | |
# - name: Install Kind | |
# uses: ./.github/actions/setup-kind | |
# with: | |
# architecture: amd64 | |
# | |
# - name: Debug | |
# run: | | |
# sudo iptables -vnL FORWARD | head | |
# sudo iptables -vnL DOCKER-USER | |
# sudo cat /etc/docker/daemon.json | |
# | |
# - name: Debug pull | |
# run: "docker pull quay.io/strimzi-test-clients/test-clients:0.11.0-kafka-4.0.0" | |
# | |
# - name: Debug rm | |
# run: "docker rmi quay.io/strimzi-test-clients/test-clients:0.11.0-kafka-4.0.0" | |
# | |
# - name: Debug kind | |
# run: "docker exec kind-cluster-control-plane crictl pull quay.io/strimzi-test-clients/test-clients:0.11.0-kafka-4.0.0" | |
## | |
build-artifacts: | |
name: build-artifacts | |
needs: parse-params | |
if: ${{ needs.parse-params.outputs.runTests == 'true' }} | |
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: build-artifacts | |
if: ${{ needs.parse-params.outputs.runTests == 'true' }} | |
strategy: | |
matrix: | |
architecture: [amd64, arm64] | |
# Local registry for building the images | |
# TODO - check if the image can be cached | |
services: | |
registry: | |
image: registry:2 | |
ports: | |
- 5000:5000 | |
# runs-on: oracle-4cpu-16gb-x86-64 | |
runs-on: oracle-vm-2cpu-8gb-x86-64 | |
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 | |
if: ${{ needs.parse-params.outputs.runTests == 'true' }} | |
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 }} |