From 5eebfbd05e2f953956d42b5e2413bc0a18d3f885 Mon Sep 17 00:00:00 2001 From: Gareth Clay Date: Mon, 2 Oct 2023 13:24:36 +0100 Subject: [PATCH] Switch to concourse-release-scripts image The jar file is no longer publicly available. --- ci/images/spring-credhub-ci/Dockerfile | 1 - ci/pipeline.yml | 6 ------ ci/scripts/promote.sh | 11 ++++------- ci/scripts/sync-to-maven-central.sh | 4 ++-- ci/tasks/promote.yml | 6 ++---- ci/tasks/sync-to-maven-central.yml | 6 ++---- 6 files changed, 10 insertions(+), 24 deletions(-) diff --git a/ci/images/spring-credhub-ci/Dockerfile b/ci/images/spring-credhub-ci/Dockerfile index d70fc22..a203de8 100644 --- a/ci/images/spring-credhub-ci/Dockerfile +++ b/ci/images/spring-credhub-ci/Dockerfile @@ -48,4 +48,3 @@ RUN curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-c WORKDIR /unpack ADD "https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v$CONCOURSE_JAVA_SCRIPTS_VERSION/concourse-java.sh" /opt/ -ADD "https://repo.spring.io/ui/native/snapshot/io/spring/concourse/releasescripts/concourse-release-scripts/$CONCOURSE_RELEASE_SCRIPTS_VERSION/concourse-release-scripts-$CONCOURSE_RELEASE_SCRIPTS_VERSION.jar" /opt/ diff --git a/ci/pipeline.yml b/ci/pipeline.yml index de72482..9036584 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -122,7 +122,6 @@ jobs: file: git-repo/ci/tasks/promote.yml vars: release-type: M - ci-image-tag: ((ci-image-tag)) - name: promote-rc serial: true @@ -137,7 +136,6 @@ jobs: file: git-repo/ci/tasks/promote.yml vars: release-type: RC - ci-image-tag: ((ci-image-tag)) - name: promote-release serial: true @@ -152,7 +150,6 @@ jobs: file: git-repo/ci/tasks/promote.yml vars: release-type: RELEASE - ci-image-tag: ((ci-image-tag)) - name: sync-to-maven-central serial: true @@ -165,8 +162,6 @@ jobs: save_build_info: true - task: sync-to-maven-central file: git-repo/ci/tasks/sync-to-maven-central.yml - vars: - ci-image-tag: ((ci-image-tag)) resource_types: - name: artifactory-resource @@ -236,4 +231,3 @@ groups: - name: "ci-images" jobs: - build-ci-images - diff --git a/ci/scripts/promote.sh b/ci/scripts/promote.sh index 97e0e22..54388d0 100755 --- a/ci/scripts/promote.sh +++ b/ci/scripts/promote.sh @@ -1,13 +1,10 @@ #!/bin/bash set -euo pipefail -# shellcheck source=scripts/common.sh -source $(dirname $0)/common.sh +readonly BUILD_INFO_LOCATION="$(pwd)/artifactory-repo/build-info.json" +readonly VERSION=$( jq -r '.buildInfo.modules[0].id' < "$BUILD_INFO_LOCATION" | sed 's/.*:.*:\(.*\)/\1/' ) -version=$( cat artifactory-repo/build-info.json | jq -r '.buildInfo.modules[0].id' | sed 's/.*:.*:\(.*\)/\1/' ) -export BUILD_INFO_LOCATION=$(pwd)/artifactory-repo/build-info.json - -java -jar /opt/concourse-release-scripts*.jar promote $RELEASE_TYPE $BUILD_INFO_LOCATION +java -jar /concourse-release-scripts.jar promote "$RELEASE_TYPE" "$BUILD_INFO_LOCATION" echo "Promotion complete" -echo $version > version/version +echo "$VERSION" > version/version diff --git a/ci/scripts/sync-to-maven-central.sh b/ci/scripts/sync-to-maven-central.sh index ef5269f..10e1439 100755 --- a/ci/scripts/sync-to-maven-central.sh +++ b/ci/scripts/sync-to-maven-central.sh @@ -4,8 +4,8 @@ set -euo pipefail readonly BUILD_INFO_LOCATION="$(pwd)/artifactory-repo/build-info.json" readonly CONFIG_DIR="$(pwd)/git-repo/ci/config" -java -jar /opt/concourse-release-scripts*.jar \ - --spring.config.location="${CONFIG_DIR}/release-scripts.yml" \ +java -jar /concourse-release-scripts.jar \ + --spring.config.location="$CONFIG_DIR/release-scripts.yml" \ publishToCentral 'RELEASE' "$BUILD_INFO_LOCATION" "artifactory-repo" echo "Sync complete" diff --git a/ci/tasks/promote.yml b/ci/tasks/promote.yml index bf01024..ef4a016 100644 --- a/ci/tasks/promote.yml +++ b/ci/tasks/promote.yml @@ -3,10 +3,8 @@ platform: linux image_resource: type: registry-image source: - repository: ((corporate-harbor-registry))/((dockerhub-organization))/spring-credhub-ci - username: ((corporate-harbor-robot-account.username)) - password: ((corporate-harbor-robot-account.password)) - tag: ((ci-image-tag)) + repository: ((dockerhub-mirror-registry))/springio/concourse-release-scripts + tag: '0.3.4' inputs: - name: git-repo - name: artifactory-repo diff --git a/ci/tasks/sync-to-maven-central.yml b/ci/tasks/sync-to-maven-central.yml index c37527e..0b5d009 100644 --- a/ci/tasks/sync-to-maven-central.yml +++ b/ci/tasks/sync-to-maven-central.yml @@ -3,10 +3,8 @@ platform: linux image_resource: type: registry-image source: - repository: ((corporate-harbor-registry))/((dockerhub-organization))/spring-credhub-ci - username: ((corporate-harbor-robot-account.username)) - password: ((corporate-harbor-robot-account.password)) - tag: ((ci-image-tag)) + repository: ((dockerhub-mirror-registry))/springio/concourse-release-scripts + tag: '0.3.4' inputs: - name: git-repo - name: artifactory-repo