diff --git a/.azure/build-pipeline.yaml b/.azure/build-pipeline.yaml
index 18b2824..6d641e3 100644
--- a/.azure/build-pipeline.yaml
+++ b/.azure/build-pipeline.yaml
@@ -13,6 +13,10 @@ pr:
include:
- '*'
+variables:
+ isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
+ isTagBranch: $[startsWith(variables['build.sourceBranch'], 'refs/tags/')]
+
jobs:
- job: 'main_branch_build'
displayName: 'Build'
@@ -21,9 +25,9 @@ jobs:
strategy:
matrix:
'java-11':
- jdk_version: '11'
+ JDK_VERSION: '11'
'java-17':
- jdk_version: '17'
+ JDK_VERSION: '17'
# Base system
pool:
vmImage: 'Ubuntu-22.04'
@@ -33,30 +37,25 @@ jobs:
inputs:
key: 'maven-cache | $(System.JobName) | **/pom.xml'
restoreKeys: |
- maven-cache | $(System.JobName)
- maven-cache
+ maven-cache | $(System.JobName)
+ maven-cache
path: $(HOME)/.m2/repository
displayName: Maven cache
- template: 'templates/steps/setup_docker.yaml'
- template: 'templates/steps/setup_java.yaml'
parameters:
- JDK_VERSION: $(jdk_version)
+ JDK_VERSION: $(JDK_VERSION)
- - bash: mvn clean verify
+ - bash: mvn -Dfailsafe.rerunFailingTestsCount=3 clean verify
env:
# Test container optimization
TESTCONTAINERS_RYUK_DISABLED: TRUE
TESTCONTAINERS_CHECKS_DISABLE: TRUE
displayName: "Strimzi test container build & verify"
- - bash: ".azure/scripts/push_to_nexus.sh"
- env:
- GPG_PASSPHRASE: $(GPG_PASSPHRASE)
- GPG_SIGNING_KEY: $(GPG_SIGNING_KEY)
- NEXUS_USERNAME: $(NEXUS_USERNAME)
- NEXUS_PASSWORD: $(NEXUS_PASSWORD)
- displayName: "Push artifacts to Nexus repository"
- condition: and(succeeded(), or(eq(variables['build.sourceBranch'], 'refs/heads/main'), startsWith(variables['build.sourceBranch'], 'refs/tags/')))
+ - template: 'templates/steps/push_artifacts.yaml'
+ parameters:
+ JDK_VERSION: variables.JDK_VERSION
- task: PublishTestResults@2
inputs:
diff --git a/.azure/templates/steps/push_artifacts.yaml b/.azure/templates/steps/push_artifacts.yaml
new file mode 100644
index 0000000..8d7d891
--- /dev/null
+++ b/.azure/templates/steps/push_artifacts.yaml
@@ -0,0 +1,13 @@
+parameters:
+ - name: JDK_VERSION
+ type: string
+ default: '17'
+steps:
+ - bash: ".azure/scripts/push_to_nexus.sh"
+ env:
+ GPG_PASSPHRASE: $(GPG_PASSPHRASE)
+ GPG_SIGNING_KEY: $(GPG_SIGNING_KEY)
+ NEXUS_USERNAME: $(NEXUS_USERNAME)
+ NEXUS_PASSWORD: $(NEXUS_PASSWORD)
+ displayName: "Push artifacts to Nexus repository"
+ condition: and(succeeded(), or(eq(variables.isMain, true), eq(variables.isTagBranch, true)), eq(${{ parameters.JDK_VERSION }}, '17'))
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 001ec3f..ec7f902 100644
--- a/pom.xml
+++ b/pom.xml
@@ -110,7 +110,7 @@
3.0.1
3.1.1
1.6
- 1.6.3
+ 1.6.13
1.21