From f76504512eb64a81ba3240acb7b9b6734af361b4 Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Tue, 16 Mar 2021 11:14:29 +0100 Subject: [PATCH] Fix release pipeline for Maven Central publication This commit fixes the missing pieces in our Maven Central publication pipeline. Our first attempt at releasing with it showed a few problems: * the promote task did not have the artifacts downladed with the artifactory repository * we applied the wrong Sonatype credentials to the task * the github changelog task would fail because of docker rate limiting since we were not using the right type of resource, which is configured with the proper caching mechanism See gh-26654 --- ci/images/setup.sh | 2 +- ci/pipeline.yml | 6 +++--- ci/tasks/generate-changelog.yml | 2 +- ci/tasks/promote-version.yml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ci/images/setup.sh b/ci/images/setup.sh index 87c3fbc2cc77..8b93bfa29bce 100755 --- a/ci/images/setup.sh +++ b/ci/images/setup.sh @@ -14,7 +14,7 @@ rm -rf /var/lib/apt/lists/* curl https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.4/concourse-java.sh > /opt/concourse-java.sh -curl --output /opt/concourse-release-scripts.jar https://repo.spring.io/release/io/spring/concourse/releasescripts/concourse-release-scripts/0.3.0/concourse-release-scripts-0.3.0.jar +curl --output /opt/concourse-release-scripts.jar https://repo.spring.io/release/io/spring/concourse/releasescripts/concourse-release-scripts/0.3.1/concourse-release-scripts-0.3.1.jar ########################################################### # JAVA diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 5c8f357573c4..ba1167f5144b 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -9,8 +9,8 @@ anchors: GRADLE_ENTERPRISE_CACHE_USERNAME: ((gradle_enterprise_cache_user.username)) GRADLE_ENTERPRISE_CACHE_PASSWORD: ((gradle_enterprise_cache_user.password)) sonatype-task-params: &sonatype-task-params - SONATYPE_USER_TOKEN: ((sonatype-user-token)) - SONATYPE_PASSWORD_TOKEN: ((sonatype-user-token-password)) + SONATYPE_USERNAME: ((sonatype-username)) + SONATYPE_PASSWORD: ((sonatype-password)) SONATYPE_URL: ((sonatype-url)) SONATYPE_STAGING_PROFILE_ID: ((sonatype-staging-profile-id)) artifactory-task-params: &artifactory-task-params @@ -348,7 +348,7 @@ jobs: trigger: false passed: [stage-release] params: - download_artifacts: false + download_artifacts: true save_build_info: true - task: promote image: ci-image diff --git a/ci/tasks/generate-changelog.yml b/ci/tasks/generate-changelog.yml index 334ebab56699..ea048af96a0f 100755 --- a/ci/tasks/generate-changelog.yml +++ b/ci/tasks/generate-changelog.yml @@ -1,7 +1,7 @@ --- platform: linux image_resource: - type: docker-image + type: registry-image source: repository: springio/github-changelog-generator tag: '0.0.6' diff --git a/ci/tasks/promote-version.yml b/ci/tasks/promote-version.yml index 831e5c93c72f..abdd8fed5c5c 100644 --- a/ci/tasks/promote-version.yml +++ b/ci/tasks/promote-version.yml @@ -10,8 +10,8 @@ params: ARTIFACTORY_SERVER: ARTIFACTORY_USERNAME: ARTIFACTORY_PASSWORD: - SONATYPE_USER_TOKEN: - SONATYPE_PASSWORD_TOKEN: + SONATYPE_USER: + SONATYPE_PASSWORD: SONATYPE_URL: SONATYPE_STAGING_PROFILE_ID: run: