From 7191df35bd2bb847244a10ed79ffae82bc344359 Mon Sep 17 00:00:00 2001 From: Jakub Stejskal Date: Fri, 13 Mar 2026 21:35:07 +0100 Subject: [PATCH 1/6] Use Strimzi GitHub Actions v1 Signed-off-by: Jakub Stejskal --- .github/workflows/build.yml | 18 ++++---- .../workflows/github-actions-integration.yml | 41 +++++++++++++++++++ 2 files changed, 50 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/github-actions-integration.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 45553bc..a552efd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,17 +34,17 @@ jobs: - uses: actions/checkout@v6 - name: Setup Java and Maven - uses: strimzi/github-actions/.github/actions/dependencies/setup-java@main + uses: strimzi/github-actions/.github/actions/dependencies/setup-java@v1 with: javaVersion: ${{ matrix.java.version }} - name: Install yq - uses: strimzi/github-actions/.github/actions/dependencies/install-yq@main + uses: strimzi/github-actions/.github/actions/dependencies/install-yq@v1 with: version: "v4.6.3" - name: Build binaries using build-binaries action - uses: strimzi/github-actions/.github/actions/build/build-binaries@main + uses: strimzi/github-actions/.github/actions/build/build-binaries@v1 with: mainJavaBuild: ${{ matrix.java.mainBuild }} artifactSuffix: "client-examples" @@ -66,9 +66,9 @@ jobs: - uses: actions/checkout@v6 - name: Install Docker - uses: strimzi/github-actions/.github/actions/dependencies/install-docker@main + uses: strimzi/github-actions/.github/actions/dependencies/install-docker@v1 - - uses: strimzi/github-actions/.github/actions/build/build-containers@main + - uses: strimzi/github-actions/.github/actions/build/build-containers@v1 with: architecture: ${{ matrix.architecture }} imagesDir: "*-${{ matrix.architecture }}.tar.gz" @@ -88,20 +88,20 @@ jobs: - uses: actions/checkout@v6 - name: Install Docker - uses: strimzi/github-actions/.github/actions/dependencies/install-docker@main + uses: strimzi/github-actions/.github/actions/dependencies/install-docker@v1 - name: Install yq - uses: strimzi/github-actions/.github/actions/dependencies/install-yq@main + uses: strimzi/github-actions/.github/actions/dependencies/install-yq@v1 with: version: "v4.6.3" - name: Install Syft - uses: strimzi/github-actions/.github/actions/dependencies/install-syft@main + uses: strimzi/github-actions/.github/actions/dependencies/install-syft@v1 with: version: "1.20.0" - name: Push containers using push-containers action - uses: strimzi/github-actions/.github/actions/build/push-containers@main + uses: strimzi/github-actions/.github/actions/build/push-containers@v1 with: registryUser: ${{ secrets.QUAY_USER }} registryPassword: ${{ secrets.QUAY_PASS }} diff --git a/.github/workflows/github-actions-integration.yml b/.github/workflows/github-actions-integration.yml new file mode 100644 index 0000000..8333edf --- /dev/null +++ b/.github/workflows/github-actions-integration.yml @@ -0,0 +1,41 @@ +name: GitHub Actions Integration + +on: + pull_request: + paths: + - '**/pom.xml' + - '**/Dockerfile' + - '**/Makefile' + - 'Makefile.docker' + - 'Makefile.maven' + - 'Makefile.os' + - '.github/workflows/github-actions-integration.yml' + branches: + - "*" + +permissions: + contents: read + id-token: write + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test-github-actions-integration: + uses: strimzi/github-actions/.github/workflows/reusable-test-integrations.yml@v1 + with: + repo: ${{ github.repository }} + ref: ${{ github.sha }} + architecture: "amd64" + artifactSuffix: "test-clients" + buildContainers: false + modules: "./" + nexusCheck: "test-clients" + javaVersion: "21" + helmChartName: "none" + releaseVersion: "6.6.6" + imagesDir: "none" + clusterOperatorBuild: false + githubActionsRef: "v1" + secrets: inherit \ No newline at end of file From 7921bae166a15b181f6a636a290f737df76e1ad8 Mon Sep 17 00:00:00 2001 From: Jakub Stejskal Date: Fri, 13 Mar 2026 21:40:07 +0100 Subject: [PATCH 2/6] Setup proper java Signed-off-by: Jakub Stejskal --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a552efd..b3f9fe0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -90,6 +90,10 @@ jobs: - name: Install Docker uses: strimzi/github-actions/.github/actions/dependencies/install-docker@v1 + - uses: strimzi/github-actions/.github/actions/dependencies/setup-java@main + with: + javaVersion: "17" + - name: Install yq uses: strimzi/github-actions/.github/actions/dependencies/install-yq@v1 with: From 5a92cfb051c88bcdfe8bd1c08fbdb164d2b1ca4c Mon Sep 17 00:00:00 2001 From: Jakub Stejskal Date: Fri, 13 Mar 2026 21:45:00 +0100 Subject: [PATCH 3/6] Use Java 21 Signed-off-by: Jakub Stejskal --- .github/workflows/build.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b3f9fe0..977ca9b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,10 +24,10 @@ jobs: name: Build Client Examples strategy: matrix: - # Java 17 is used as default version + # Java 21 is used as default version # In case of adding new version make sure that build-containers has correct static version set java: - - version: "17" + - version: "21" mainBuild: true runs-on: ubuntu-latest steps: @@ -90,10 +90,6 @@ jobs: - name: Install Docker uses: strimzi/github-actions/.github/actions/dependencies/install-docker@v1 - - uses: strimzi/github-actions/.github/actions/dependencies/setup-java@main - with: - javaVersion: "17" - - name: Install yq uses: strimzi/github-actions/.github/actions/dependencies/install-yq@v1 with: From fe080e00ee35cfd59f0238764685c259d98de033 Mon Sep 17 00:00:00 2001 From: Jakub Stejskal Date: Fri, 13 Mar 2026 21:47:22 +0100 Subject: [PATCH 4/6] Fix tests Signed-off-by: Jakub Stejskal --- .github/workflows/build.yml | 4 ++-- .github/workflows/github-actions-integration.yml | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 977ca9b..a552efd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,10 +24,10 @@ jobs: name: Build Client Examples strategy: matrix: - # Java 21 is used as default version + # Java 17 is used as default version # In case of adding new version make sure that build-containers has correct static version set java: - - version: "21" + - version: "17" mainBuild: true runs-on: ubuntu-latest steps: diff --git a/.github/workflows/github-actions-integration.yml b/.github/workflows/github-actions-integration.yml index 8333edf..7d1ddad 100644 --- a/.github/workflows/github-actions-integration.yml +++ b/.github/workflows/github-actions-integration.yml @@ -28,14 +28,14 @@ jobs: repo: ${{ github.repository }} ref: ${{ github.sha }} architecture: "amd64" - artifactSuffix: "test-clients" + artifactSuffix: "client-examples" buildContainers: false - modules: "./" - nexusCheck: "test-clients" - javaVersion: "21" + modules: "none" + nexusCheck: "none" + javaVersion: "17" helmChartName: "none" - releaseVersion: "6.6.6" - imagesDir: "none" + releaseVersion: "none" + imagesDir: "*-amd64.tar.gz" clusterOperatorBuild: false githubActionsRef: "v1" secrets: inherit \ No newline at end of file From 4cbe602b13997233160f9bc684fa170fbe890dd2 Mon Sep 17 00:00:00 2001 From: Jakub Stejskal Date: Fri, 13 Mar 2026 22:01:34 +0100 Subject: [PATCH 5/6] Delete Azure Pipelines Signed-off-by: Jakub Stejskal --- .azure/build-pipeline.yaml | 50 ------------- .azure/scripts/install_cosign.sh | 11 --- .azure/templates/jobs/build_container.yaml | 43 ------------ .azure/templates/jobs/build_java.yaml | 46 ------------ .azure/templates/jobs/push_container.yaml | 70 ------------------- .azure/templates/steps/maven_cache.yaml | 9 --- .../steps/prerequisites/install_cosign.yaml | 3 - .../steps/prerequisites/install_docker.yaml | 11 --- .../steps/prerequisites/install_java.yaml | 11 --- 9 files changed, 254 deletions(-) delete mode 100644 .azure/build-pipeline.yaml delete mode 100755 .azure/scripts/install_cosign.sh delete mode 100644 .azure/templates/jobs/build_container.yaml delete mode 100644 .azure/templates/jobs/build_java.yaml delete mode 100644 .azure/templates/jobs/push_container.yaml delete mode 100644 .azure/templates/steps/maven_cache.yaml delete mode 100644 .azure/templates/steps/prerequisites/install_cosign.yaml delete mode 100644 .azure/templates/steps/prerequisites/install_docker.yaml delete mode 100644 .azure/templates/steps/prerequisites/install_java.yaml diff --git a/.azure/build-pipeline.yaml b/.azure/build-pipeline.yaml deleted file mode 100644 index faa9e25..0000000 --- a/.azure/build-pipeline.yaml +++ /dev/null @@ -1,50 +0,0 @@ -# Triggers -trigger: - branches: - include: - - 'main' - - 'release-*' - tags: - include: - - '*' -pr: - autoCancel: true - branches: - include: - - '*' - -# Stages -stages: - - stage: java_build - displayName: Java build - jobs: - - template: 'templates/jobs/build_java.yaml' - - stage: container_build - displayName: Prepare Container - dependsOn: - - java_build - jobs: - - template: 'templates/jobs/build_container.yaml' - parameters: - artifactSource: 'current' - artifactProject: 'strimzi' - artifactPipeline: '' - artifactRunVersion: '' - artifactRunId: '' - architectures: ['amd64', 'arm64', 's390x', 'ppc64le'] - # Push is now done by GitHub Actions - # - stage: container_publish - # displayName: Publish Container - # dependsOn: - # - container_build - # condition: and(succeeded(), eq(variables['build.sourceBranch'], 'refs/heads/main')) - # jobs: - # - template: 'templates/jobs/push_container.yaml' - # parameters: - # dockerTag: 'latest' - # artifactSource: 'current' - # artifactProject: 'strimzi' - # artifactPipeline: '' - # artifactRunVersion: '' - # artifactRunId: '' - # architectures: ['amd64', 'arm64', 's390x', 'ppc64le'] diff --git a/.azure/scripts/install_cosign.sh b/.azure/scripts/install_cosign.sh deleted file mode 100755 index f4b1cd5..0000000 --- a/.azure/scripts/install_cosign.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -readonly VERSION="2.2.0" - -ARCH=$1 -if [ -z "$ARCH" ]; then - ARCH="amd64" -fi - -curl -L https://github.com/sigstore/cosign/releases/download/v${VERSION}/cosign-linux-${ARCH} > cosign && chmod +x cosign -sudo mv cosign /usr/bin/ diff --git a/.azure/templates/jobs/build_container.yaml b/.azure/templates/jobs/build_container.yaml deleted file mode 100644 index b5cd753..0000000 --- a/.azure/templates/jobs/build_container.yaml +++ /dev/null @@ -1,43 +0,0 @@ -jobs: - - job: 'build_container' - displayName: 'Build' - # Strategy for the job - strategy: - matrix: - ${{ each arch in parameters.architectures }}: - ${{ arch }}: - arch: ${{ arch }} - # Set timeout for jobs - timeoutInMinutes: 60 - # Base system - pool: - vmImage: 'Ubuntu-22.04' - # Pipeline steps - steps: - - template: '../steps/prerequisites/install_docker.yaml' - - task: DownloadPipelineArtifact@2 - inputs: - source: '${{ parameters.artifactSource }}' - artifact: Binary - path: $(System.DefaultWorkingDirectory)/ - project: '${{ parameters.artifactProject }}' - pipeline: '${{ parameters.artifactPipeline }}' - runVersion: '${{ parameters.artifactRunVersion }}' - runId: '${{ parameters.artifactRunId }}' - - bash: tar -xvf target.tar - displayName: "Untar the target directory" - - bash: "make docker_build docker_save" - env: - DOCKER_BUILDKIT: 1 - BUILD_REASON: $(Build.Reason) - BRANCH: $(Build.SourceBranch) - DOCKER_REGISTRY: "quay.io" - DOCKER_ORG: "strimzi-examples" - DOCKER_ARCHITECTURE: $(arch) - displayName: "Build container - $(arch)" - - # We have to TAR the container archives directory and store it - - bash: tar -cvpf containers-$(arch).tar *-$(arch).tar.gz - displayName: "Tar the containers" - - publish: $(System.DefaultWorkingDirectory)/containers-$(arch).tar - artifact: Containers-$(arch) diff --git a/.azure/templates/jobs/build_java.yaml b/.azure/templates/jobs/build_java.yaml deleted file mode 100644 index 1816b4f..0000000 --- a/.azure/templates/jobs/build_java.yaml +++ /dev/null @@ -1,46 +0,0 @@ -jobs: - - job: 'build_and_test_java' - displayName: 'Build & Test' - # Strategy for the job - strategy: - matrix: - 'java-17': - image: 'Ubuntu-22.04' - jdk_version: '17' - main_build: 'true' - # Set timeout for jobs - timeoutInMinutes: 60 - # Base system - pool: - vmImage: $(image) - # Variables - variables: - MVN_CACHE_FOLDER: $(HOME)/.m2/repository - MVN_ARGS: '-e -V -B' - # Pipeline steps - steps: - # Get cached Maven repository - - template: "../steps/maven_cache.yaml" - - template: '../steps/prerequisites/install_java.yaml' - parameters: - JDK_VERSION: $(jdk_version) - - bash: "make java_install" - displayName: "Build & Test Java" - env: - BUILD_REASON: $(Build.Reason) - BRANCH: $(Build.SourceBranch) - COMMIT: $(Build.SourceVersion) - MVN_ARGS: "-e -V -B" - # Run spotbugs - - bash: "make spotbugs" - displayName: "Spotbugs" - env: - MVN_ARGS: "-e -V -B" - # We have to TAR the target directories to maintain the permissions of - # the files which would otherwise change when downloading the artifact - - bash: "tar -cvpf target.tar $(find . -type d -print | grep target)" - displayName: "Tar the target directories" - condition: and(succeeded(), eq(variables['main_build'], 'true')) - - publish: $(System.DefaultWorkingDirectory)/target.tar - artifact: Binary - condition: and(succeeded(), eq(variables['main_build'], 'true')) \ No newline at end of file diff --git a/.azure/templates/jobs/push_container.yaml b/.azure/templates/jobs/push_container.yaml deleted file mode 100644 index 69cb807..0000000 --- a/.azure/templates/jobs/push_container.yaml +++ /dev/null @@ -1,70 +0,0 @@ -jobs: - - job: 'push_container' - displayName: 'Tag & Push' - # Set timeout for jobs - timeoutInMinutes: 60 - # Base system - pool: - vmImage: 'Ubuntu-22.04' - # Pipeline steps - steps: - - template: '../steps/prerequisites/install_docker.yaml' - - template: "../steps/prerequisites/install_cosign.yaml" - - # Get the container archives - - ${{ each arch in parameters.architectures }}: - - task: DownloadPipelineArtifact@2 - inputs: - source: '${{ parameters.artifactSource }}' - artifact: Containers-${{ arch }} - path: $(System.DefaultWorkingDirectory)/ - project: '${{ parameters.artifactProject }}' - pipeline: '${{ parameters.artifactPipeline }}' - runVersion: '${{ parameters.artifactRunVersion }}' - runId: '${{ parameters.artifactRunId }}' - displayName: "Download the ${{ arch }} container archives" - - bash: tar -xvf containers-${{ arch }}.tar - displayName: "Untar the ${{ arch }} containers" - - bash: rm containers-${{ arch }}.tar - displayName: "Delete the original archive with the ${{ arch }} containers" - - # Push containers and their manifests - - bash: "docker login -u $DOCKER_USER -p $DOCKER_PASS $DOCKER_REGISTRY" - displayName: "Login to container registry" - env: - BUILD_REASON: $(Build.Reason) - BRANCH: $(Build.SourceBranch) - DOCKER_USER: $(QUAY_USER) - DOCKER_PASS: $(QUAY_PASS) - DOCKER_REGISTRY: "quay.io" - - ${{ each arch in parameters.architectures }}: - - bash: make docker_load docker_tag docker_push docker_delete_archive - displayName: "Push the ${{ arch }} containers and create manifest" - env: - BUILD_REASON: $(Build.Reason) - BRANCH: $(Build.SourceBranch) - DOCKER_REGISTRY: "quay.io" - DOCKER_ORG: "strimzi-examples" - DOCKER_TAG: '${{ parameters.dockerTag }}' - DOCKER_ARCHITECTURE: ${{ arch }} - - bash: "make docker_amend_manifest" - displayName: "Create multi-platform manifests" - env: - BUILD_REASON: $(Build.Reason) - BRANCH: $(Build.SourceBranch) - DOCKER_REGISTRY: "quay.io" - DOCKER_ORG: "strimzi-examples" - DOCKER_TAG: '${{ parameters.dockerTag }}' - MANIFEST_ARCHITECTURES: '${{ join('','', parameters.architectures) }}' - - bash: "make docker_sign_manifest" - displayName: "Sign container manifest" - env: - BUILD_REASON: $(Build.Reason) - BRANCH: $(Build.SourceBranch) - BUILD_ID: $(Build.BuildId) - BUILD_COMMIT: $(Build.SourceVersion) - DOCKER_REGISTRY: "quay.io" - DOCKER_ORG: "strimzi-examples" - DOCKER_TAG: '${{ parameters.dockerTag }}' - COSIGN_PASSWORD: $(COSIGN_PASSWORD) - COSIGN_PRIVATE_KEY: $(COSIGN_PRIVATE_KEY) diff --git a/.azure/templates/steps/maven_cache.yaml b/.azure/templates/steps/maven_cache.yaml deleted file mode 100644 index 4dc3b77..0000000 --- a/.azure/templates/steps/maven_cache.yaml +++ /dev/null @@ -1,9 +0,0 @@ -steps: - - task: Cache@2 - inputs: - key: 'maven-cache | $(System.JobName) | **/pom.xml' - restoreKeys: | - maven-cache | $(System.JobName) - maven-cache - path: $(HOME)/.m2/repository - displayName: Maven cache diff --git a/.azure/templates/steps/prerequisites/install_cosign.yaml b/.azure/templates/steps/prerequisites/install_cosign.yaml deleted file mode 100644 index f9a784b..0000000 --- a/.azure/templates/steps/prerequisites/install_cosign.yaml +++ /dev/null @@ -1,3 +0,0 @@ -steps: - - bash: ".azure/scripts/install_cosign.sh" - displayName: "Install cosign" \ No newline at end of file diff --git a/.azure/templates/steps/prerequisites/install_docker.yaml b/.azure/templates/steps/prerequisites/install_docker.yaml deleted file mode 100644 index a146982..0000000 --- a/.azure/templates/steps/prerequisites/install_docker.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# Steps needed for local Docker installation -steps: - - task: DockerInstaller@0 - displayName: Install Docker - inputs: - # Versions can be found from https://download.docker.com/linux/static/stable/x86_64/ - dockerVersion: 29.2.0 - releaseType: stable - - bash: | - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - displayName: 'Register QEMU binary' \ No newline at end of file diff --git a/.azure/templates/steps/prerequisites/install_java.yaml b/.azure/templates/steps/prerequisites/install_java.yaml deleted file mode 100644 index ca43101..0000000 --- a/.azure/templates/steps/prerequisites/install_java.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# Step to configure JAVA on the agent -parameters: - - name: JDK_VERSION - default: '17' -steps: - - task: JavaToolInstaller@0 - inputs: - versionSpec: $(JDK_VERSION) - jdkArchitectureOption: 'x64' - jdkSourceOption: 'PreInstalled' - displayName: 'Configure Java' From b42af9d43ff499a8c0773abd6e1f1b74c581f048 Mon Sep 17 00:00:00 2001 From: Jakub Stejskal Date: Sat, 14 Mar 2026 22:42:49 +0100 Subject: [PATCH 6/6] Update badge in readme Signed-off-by: Jakub Stejskal --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7f8b8d5..1b8f737 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://dev.azure.com/cncf/strimzi/_apis/build/status/client-examples?branchName=main)](https://dev.azure.com/cncf/strimzi/_build/latest?definitionId=33&branchName=main) +[![Build Status](https://github.com/strimzi/client-examples/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/strimzi/client-examples/actions/workflows/build.yml?query=branch%3Amain) [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0) [![Twitter Follow](https://img.shields.io/twitter/follow/strimziio?style=social)](https://twitter.com/strimziio)