Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(3.6.x) Use concourse-release-scripts image instead of JAR #506

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci/images/scosb-ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ RUN apt-get update && \
apt-get clean

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/
11 changes: 4 additions & 7 deletions ci/scripts/promote.sh
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions ci/scripts/sync-to-maven-central.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 2 additions & 4 deletions ci/tasks/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ platform: linux
image_resource:
type: registry-image
source:
repository: ((corporate-harbor-registry))/((dockerhub-organization))/scosb-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
Expand Down
6 changes: 2 additions & 4 deletions ci/tasks/sync-to-maven-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ platform: linux
image_resource:
type: registry-image
source:
repository: ((corporate-harbor-registry))/((dockerhub-organization))/scosb-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
Expand Down