Skip to content

Commit 2de484e

Browse files
authored
Release RC artifacts to Sonatype Maven central directly (#11554)
Signed-off-by: Lukas Kral <lukywill16@gmail.com>
1 parent 1bc0d1a commit 2de484e

6 files changed

Lines changed: 18 additions & 7 deletions

File tree

.azure/build-pipeline.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,14 @@ stages:
9797
artifactRunId: ''
9898

9999
# Deploy Strimzi Java artifacts -> run only on main branch (where it deploys to OSS snapshot repos)
100-
# or release branches (where it deploys to OSS staging repos)
101100
- stage: deploy_strimzi_java
102101
displayName: Deploy Java artifacts
103102
dependsOn:
104103
- build_strimzi
105104
- test_strimzi
106105
- build_containers
107106
- build_docs
108-
condition: and(succeeded(), or(eq(variables['build.sourceBranch'], 'refs/heads/main'), startsWith(variables['build.sourceBranch'], 'refs/heads/release-')))
107+
condition: and(succeeded(), eq(variables['build.sourceBranch'], 'refs/heads/main'))
109108
jobs:
110109
- template: 'templates/jobs/build/deploy_strimzi_java.yaml'
111110
parameters:

.azure/templates/jobs/build/deploy_strimzi_java.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
JDK_VERSION: $(jdk_version)
2525

2626
# Deploy Java artifacts
27-
- bash: "make pushtonexus"
27+
- bash: "make pushtocentral"
2828
displayName: "Deploy Java artifacts"
2929
env:
3030
BUILD_REASON: $(Build.Reason)

.azure/templates/jobs/build/release_artifacts.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
jobs:
22
- job: 'release_artifacts'
3-
displayName: 'Prepare release artifacts'
3+
displayName: 'Prepare and release artifacts'
44
# Set timeout for jobs
55
timeoutInMinutes: 60
66
# Base system
@@ -11,13 +11,25 @@ jobs:
1111
# Install Prerequisites
1212
- template: "../../steps/prerequisites/install_yq.yaml"
1313
- template: "../../steps/prerequisites/install_asciidoctor.yaml"
14+
- template: '../../steps/prerequisites/install_java.yaml'
1415

1516
# Build the release files
1617
- bash: "make release"
1718
displayName: "Build release files"
1819
env:
1920
RELEASE_VERSION: '${{ parameters.releaseVersion }}'
2021

22+
# Deploy Java artifacts
23+
- bash: "make pushtocentral"
24+
displayName: "Deploy Java artifacts"
25+
env:
26+
BUILD_REASON: $(Build.Reason)
27+
BRANCH: $(Build.SourceBranch)
28+
GPG_PASSPHRASE: $(GPG_PASSPHRASE)
29+
GPG_SIGNING_KEY: $(GPG_SIGNING_KEY)
30+
CENTRAL_USERNAME: $(CENTRAL_USERNAME)
31+
CENTRAL_PASSWORD: $(CENTRAL_PASSWORD)
32+
2133
# We have to TAR the artifacts directory and store it
2234
- bash: tar -cvpf release.tar ./*${{ parameters.releaseVersion }}*
2335
displayName: "Tar the release archives"

.azure/templates/steps/prerequisites/install_java.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ parameters:
55
steps:
66
- task: JavaToolInstaller@0
77
inputs:
8-
versionSpec: $(JDK_VERSION)
8+
versionSpec: ${{ parameters.JDK_VERSION }}
99
jdkArchitectureOption: 'x64'
1010
jdkSourceOption: 'PreInstalled'
1111
displayName: 'Configure Java'

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ spotbugs: $(SUBDIRS)
141141
docu_pushtowebsite:
142142
./.azure/scripts/docu-push-to-website.sh
143143

144-
pushtonexus:
145-
./.azure/scripts/push-to-nexus.sh
144+
pushtocentral:
145+
./.azure/scripts/push-to-central.sh
146146

147147
release_docu: docu_html docu_htmlnoheader docu_pdf
148148
mkdir -p strimzi-$(RELEASE_VERSION)/docs/html

0 commit comments

Comments
 (0)