From d359b1851c50c1e08701d5045162d2acb3cd0537 Mon Sep 17 00:00:00 2001 From: Paolo Patierno Date: Tue, 17 Jun 2025 11:58:51 +0200 Subject: [PATCH 1/2] Added publish release candidates artifacts Signed-off-by: Paolo Patierno --- .azure/build-pipeline.yaml | 3 ++- .azure/release-pipeline.yaml | 12 ++++++++++-- .azure/templates/jobs/build_java.yaml | 2 -- .azure/templates/jobs/deploy_java.yaml | 2 -- .azure/templates/jobs/run_systemtests.yaml | 2 -- .../templates/steps/prerequisites/install_java.yaml | 2 +- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.azure/build-pipeline.yaml b/.azure/build-pipeline.yaml index 3598d55..20e74b1 100644 --- a/.azure/build-pipeline.yaml +++ b/.azure/build-pipeline.yaml @@ -63,7 +63,8 @@ stages: displayName: Deploy Java dependsOn: - run_systemtests - condition: and(succeeded(), or(eq(variables['build.sourceBranch'], 'refs/heads/main'), startsWith(variables['build.sourceBranch'], 'refs/heads/release-'))) + # Deploy Strimzi Java artifacts -> run only on main branch (where it deploys to OSS snapshot repos) + condition: and(succeeded(), eq(variables['build.sourceBranch'], 'refs/heads/main')) jobs: - template: 'templates/jobs/deploy_java.yaml' parameters: diff --git a/.azure/release-pipeline.yaml b/.azure/release-pipeline.yaml index f1c9293..50c3a07 100644 --- a/.azure/release-pipeline.yaml +++ b/.azure/release-pipeline.yaml @@ -45,8 +45,6 @@ stages: # Pipeline steps steps: - template: 'templates/steps/prerequisites/install_java.yaml' - parameters: - JDK_VERSION: $(jdk_version) - template: "templates/steps/prerequisites/install_helm.yaml" - bash: ".azure/scripts/release-artifacts.sh" env: @@ -55,6 +53,16 @@ stages: RELEASE_VERSION: '${{ parameters.releaseVersion }}' MVN_ARGS: '-B' displayName: "Prepare release artifacts" + # Deploy Java artifacts + - bash: "./.azure/scripts/push-to-central.sh" + env: + MVN_ARGS: "-e -V -B" + BUILD_REASON: $(Build.Reason) + BRANCH: $(Build.SourceBranch) + GPG_PASSPHRASE: $(GPG_PASSPHRASE) + GPG_SIGNING_KEY: $(GPG_SIGNING_KEY) + CENTRAL_USERNAME: $(CENTRAL_USERNAME) + CENTRAL_PASSWORD: $(CENTRAL_PASSWORD) - publish: $(System.DefaultWorkingDirectory)/strimzi-access-operator-${{ parameters.releaseVersion }}.tar.gz artifact: ReleaseTarGzArchive - publish: $(System.DefaultWorkingDirectory)/strimzi-access-operator-${{ parameters.releaseVersion }}.zip diff --git a/.azure/templates/jobs/build_java.yaml b/.azure/templates/jobs/build_java.yaml index 85ccb3e..ca2ba8e 100644 --- a/.azure/templates/jobs/build_java.yaml +++ b/.azure/templates/jobs/build_java.yaml @@ -22,8 +22,6 @@ jobs: - template: "../steps/maven_cache.yaml" - template: "../steps/prerequisites/install_yq.yaml" - template: '../steps/prerequisites/install_java.yaml' - parameters: - JDK_VERSION: $(jdk_version) # Build the Java code without tests - bash: "make java_install" displayName: "Build Java code" diff --git a/.azure/templates/jobs/deploy_java.yaml b/.azure/templates/jobs/deploy_java.yaml index 989bea3..6b476fb 100644 --- a/.azure/templates/jobs/deploy_java.yaml +++ b/.azure/templates/jobs/deploy_java.yaml @@ -16,8 +16,6 @@ jobs: steps: - template: "../steps/maven_cache.yaml" - template: '../steps/prerequisites/install_java.yaml' - parameters: - JDK_VERSION: $(jdk_version) - task: DownloadPipelineArtifact@2 inputs: source: '${{ parameters.artifactSource }}' diff --git a/.azure/templates/jobs/run_systemtests.yaml b/.azure/templates/jobs/run_systemtests.yaml index 67a0ebb..8ea835f 100644 --- a/.azure/templates/jobs/run_systemtests.yaml +++ b/.azure/templates/jobs/run_systemtests.yaml @@ -13,8 +13,6 @@ jobs: timeoutInMinutes: 30 steps: - template: '../steps/prerequisites/install_java.yaml' - parameters: - JDK_VERSION: $(jdk_version) - template: "../steps/prerequisites/install_docker.yaml" - template: "../steps/prerequisites/install_kind.yaml" - task: DownloadPipelineArtifact@2 diff --git a/.azure/templates/steps/prerequisites/install_java.yaml b/.azure/templates/steps/prerequisites/install_java.yaml index ca43101..140b240 100644 --- a/.azure/templates/steps/prerequisites/install_java.yaml +++ b/.azure/templates/steps/prerequisites/install_java.yaml @@ -5,7 +5,7 @@ parameters: steps: - task: JavaToolInstaller@0 inputs: - versionSpec: $(JDK_VERSION) + versionSpec: ${{ parameters.JDK_VERSION }} jdkArchitectureOption: 'x64' jdkSourceOption: 'PreInstalled' displayName: 'Configure Java' From 57f9dfd51a2d30a97e84cf5e61329c10b456f674 Mon Sep 17 00:00:00 2001 From: Paolo Patierno Date: Tue, 17 Jun 2025 14:20:36 +0200 Subject: [PATCH 2/2] Fixed im-konge comments Signed-off-by: Paolo Patierno --- .azure/release-pipeline.yaml | 5 ----- .azure/templates/jobs/build_java.yaml | 2 ++ .azure/templates/jobs/deploy_java.yaml | 2 ++ .azure/templates/jobs/run_systemtests.yaml | 2 ++ 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.azure/release-pipeline.yaml b/.azure/release-pipeline.yaml index 50c3a07..fecbd96 100644 --- a/.azure/release-pipeline.yaml +++ b/.azure/release-pipeline.yaml @@ -32,11 +32,6 @@ stages: jobs: - job: 'release_artifacts' displayName: 'Release Artifacts' - strategy: - matrix: - 'java-17': - image: 'Ubuntu-22.04' - jdk_version: '17' # Set timeout for jobs timeoutInMinutes: 60 # Base system diff --git a/.azure/templates/jobs/build_java.yaml b/.azure/templates/jobs/build_java.yaml index ca2ba8e..85ccb3e 100644 --- a/.azure/templates/jobs/build_java.yaml +++ b/.azure/templates/jobs/build_java.yaml @@ -22,6 +22,8 @@ jobs: - template: "../steps/maven_cache.yaml" - template: "../steps/prerequisites/install_yq.yaml" - template: '../steps/prerequisites/install_java.yaml' + parameters: + JDK_VERSION: $(jdk_version) # Build the Java code without tests - bash: "make java_install" displayName: "Build Java code" diff --git a/.azure/templates/jobs/deploy_java.yaml b/.azure/templates/jobs/deploy_java.yaml index 6b476fb..989bea3 100644 --- a/.azure/templates/jobs/deploy_java.yaml +++ b/.azure/templates/jobs/deploy_java.yaml @@ -16,6 +16,8 @@ jobs: steps: - template: "../steps/maven_cache.yaml" - template: '../steps/prerequisites/install_java.yaml' + parameters: + JDK_VERSION: $(jdk_version) - task: DownloadPipelineArtifact@2 inputs: source: '${{ parameters.artifactSource }}' diff --git a/.azure/templates/jobs/run_systemtests.yaml b/.azure/templates/jobs/run_systemtests.yaml index 8ea835f..67a0ebb 100644 --- a/.azure/templates/jobs/run_systemtests.yaml +++ b/.azure/templates/jobs/run_systemtests.yaml @@ -13,6 +13,8 @@ jobs: timeoutInMinutes: 30 steps: - template: '../steps/prerequisites/install_java.yaml' + parameters: + JDK_VERSION: $(jdk_version) - template: "../steps/prerequisites/install_docker.yaml" - template: "../steps/prerequisites/install_kind.yaml" - task: DownloadPipelineArtifact@2