Skip to content

Commit e5aea89

Browse files
committed
Move SDKMAN to a separate job
Closes gh-21903
1 parent 6a8ad73 commit e5aea89

File tree

4 files changed

+38
-3
lines changed

4 files changed

+38
-3
lines changed

ci/pipeline.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,11 +658,28 @@ jobs:
658658
name: generated-changelog/tag
659659
tag: generated-changelog/tag
660660
body: generated-changelog/changelog.md
661+
- name: publish-to-sdkman
662+
serial: true
663+
plan:
664+
- get: ci-image
665+
- get: git-repo
666+
- get: artifactory-repo
667+
passed: [sync-to-maven-central]
668+
params:
669+
download_artifacts: false
670+
save_build_info: true
671+
- task: publish-to-sdkman
672+
image: ci-image
673+
file: git-repo/ci/tasks/publish-to-sdkman.yml
674+
params:
675+
<<: *sdkman-task-params
676+
RELEASE_TYPE: RELEASE
677+
BRANCH: ((branch))
661678
groups:
662679
- name: "builds"
663680
jobs: ["build", "jdk11-build", "jdk15-build", "windows-build"]
664681
- name: "releases"
665-
jobs: ["stage-milestone", "stage-rc", "stage-release", "promote-milestone", "promote-rc", "promote-release", "sync-to-maven-central"]
682+
jobs: ["stage-milestone", "stage-rc", "stage-release", "promote-milestone", "promote-rc", "promote-release", "sync-to-maven-central", "publish-to-sdkman"]
666683
- name: "ci-images"
667684
jobs: ["build-ci-images", "detect-docker-updates", "detect-jdk-updates", "detect-ubuntu-image-updates"]
668685
- name: "pull-requests"

ci/scripts/promote.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,5 @@ java -jar /spring-boot-release-scripts.jar distribute $RELEASE_TYPE $BUILD_INFO_
1111

1212
java -jar /spring-boot-release-scripts.jar publishGradlePlugin $RELEASE_TYPE $BUILD_INFO_LOCATION || { exit 1; }
1313

14-
java -jar /spring-boot-release-scripts.jar publishToSdkman $RELEASE_TYPE $version $BRANCH || {exit 1;}
15-
1614
echo "Promotion complete"
1715
echo $version > version/version

ci/scripts/publish-to-sdkman.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
source $(dirname $0)/common.sh
4+
5+
version=$( cat artifactory-repo/build-info.json | jq -r '.buildInfo.modules[0].id' | sed 's/.*:.*:\(.*\)/\1/' )
6+
7+
java -jar /spring-boot-release-scripts.jar publishToSdkman $RELEASE_TYPE $version $BRANCH || {exit 1;}
8+
9+
echo "Push to SDKMAN complete"

ci/tasks/publish-to-sdkman.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
platform: linux
3+
inputs:
4+
- name: artifactory-repo
5+
params:
6+
RELEASE_TYPE:
7+
BRANCH:
8+
SDKMAN_CONSUMER_KEY:
9+
SDKMAN_CONSUMER_TOKEN:
10+
run:
11+
path: git-repo/ci/scripts/publish-to-sdkman.sh

0 commit comments

Comments
 (0)