Remove promotion features.
Spring HATEOAS Examples doesn't need to be deployed to artifactory let alone Maven Central. So all the pipeline steps, maven profiles, and CI scripts involving that are removed. This should lighten things up so we can focus on making the examples as powerful as possible along with the message.
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
== Concourse CI
|
||||
|
||||
Spring HATEOAS Examples is built using Concourse as it's CI tool of choice.
|
||||
|
||||
The pipeline is defined on https://github.com/spring-projects/spring-hateoas[Spring HATEOAS], it's parent project.
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
./mvnw -P${PROFILE} -Dmaven.test.skip=true clean deploy -B
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
RELEASE=$1
|
||||
SNAPSHOT=$2
|
||||
|
||||
# Bump up the version in pom.xml to the desired version and commit the change
|
||||
./mvnw versions:set -DnewVersion=$RELEASE -DgenerateBackupPoms=false
|
||||
git add .
|
||||
git commit --message "Releasing Spring HATEOAS Examples v$RELEASE"
|
||||
|
||||
# Tag the release
|
||||
git tag -s v$RELEASE -m "v$RELEASE"
|
||||
|
||||
# Bump up the version in pom.xml to the next snapshot
|
||||
./mvnw versions:set -DnewVersion=$SNAPSHOT -DgenerateBackupPoms=false
|
||||
git add .
|
||||
git commit --message "Continue development on v$SNAPSHOT"
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e -u
|
||||
|
||||
buildName=`jq -r '.name' build-info.json`
|
||||
buildNumber=`jq -r '.number' build-info.json`
|
||||
groupId=`jq -r '.modules[0].id' build-info.json | sed 's/\(.*\):.*:.*/\1/'`
|
||||
version=`jq -r '.modules[0].id' build-info.json | sed 's/.*:.*:\(.*\)/\1/'`
|
||||
|
||||
echo "Promoting ${buildName}/${buildNumber}/${groupId}/${version} to libs-release-local"
|
||||
|
||||
curl \
|
||||
-s \
|
||||
--connect-timeout 240 \
|
||||
--max-time 2700 \
|
||||
-u ${ARTIFACTORY_USR}:${ARTIFACTORY_PSW} \
|
||||
-H 'Content-type:application/json' \
|
||||
-d '{"sourceRepos": ["libs-release-local"], "targetRepo" : "spring-distributions", "async":"true"}' \
|
||||
-f \
|
||||
-X \
|
||||
POST "https://repo.spring.io/api/build/distribute/${buildName}/${buildNumber}" > /dev/null || { echo "Failed to distribute" >&2; exit 1; }
|
||||
|
||||
echo "Waiting for artifacts to be published"
|
||||
|
||||
ARTIFACTS_PUBLISHED=false
|
||||
WAIT_TIME=10
|
||||
COUNTER=0
|
||||
|
||||
while [ $ARTIFACTS_PUBLISHED == "false" ] && [ $COUNTER -lt 120 ]; do
|
||||
|
||||
result=$( curl -s https://api.bintray.com/packages/spring/jars/"${groupId}" )
|
||||
versions=$( echo "$result" | jq -r '.versions' )
|
||||
exists=$( echo "$versions" | grep "$version" -o || true )
|
||||
|
||||
if [ "$exists" = "$version" ]; then
|
||||
ARTIFACTS_PUBLISHED=true
|
||||
fi
|
||||
|
||||
COUNTER=$(( COUNTER + 1 ))
|
||||
sleep $WAIT_TIME
|
||||
|
||||
done
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e -u
|
||||
|
||||
buildName=`jq -r '.name' build-info.json`
|
||||
buildNumber=`jq -r '.number' build-info.json`
|
||||
groupId=`jq -r '.modules[0].id' build-info.json | sed 's/\(.*\):.*:.*/\1/'`
|
||||
version=`jq -r '.modules[0].id' build-info.json | sed 's/.*:.*:\(.*\)/\1/'`
|
||||
|
||||
echo "Syncing ${buildName}/${buildNumber}/${groupId}/${version} to Maven Central..."
|
||||
|
||||
curl \
|
||||
-s \
|
||||
--connect-timeout 240 \
|
||||
--max-time 2700 \
|
||||
-u ${BINTRAY_USR}:${BINTRAY_PSW} \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d "{ \"username\": \"${SONATYPE_USR}\", \"password\": \"${SONATYPE_PSW}\"}" \
|
||||
-f \
|
||||
-X \
|
||||
POST "https://api.bintray.com/maven_central_sync/spring/jars/${groupId}/versions/${version}" > /dev/null || { echo "Failed to sync" >&2; exit 1; }
|
||||
|
||||
echo "Sync complete"
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
./mvnw -P${PROFILE} clean dependency:list test -Dsort -B
|
||||
MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -P${PROFILE} clean dependency:list test -Dsort -B
|
||||
|
||||
Reference in New Issue
Block a user