Start work on Spring Boot 2.4

This commit is contained in:
Andy Wilkinson 2020-05-28 10:52:18 +01:00
parent a84b7bccf1
commit 8e8548756e
8 changed files with 15 additions and 17 deletions

View File

@ -46,10 +46,11 @@ public final class ArtifactoryRepository {
private static String determineArtifactoryRepo(Project project) {
String version = project.getVersion().toString();
String type = version.substring(version.lastIndexOf('.') + 1);
if (type.equals("RELEASE")) {
int modifierIndex = version.lastIndexOf('-');
if (modifierIndex == -1) {
return "release";
}
String type = version.substring(modifierIndex + 1);
if (type.startsWith("M") || type.startsWith("RC")) {
return "milestone";
}

View File

@ -32,28 +32,28 @@ public class ArtifactoryRepositoryTests {
@Test
void whenProjectVersionIsMilestoneThenRepositoryIsMilestone() {
Project project = ProjectBuilder.builder().build();
project.setVersion("1.2.3.M1");
project.setVersion("1.2.3-M1");
assertThat(ArtifactoryRepository.forProject(project).getName()).isEqualTo("milestone");
}
@Test
void whenProjectVersionIsReleaseCandidateThenRepositoryIsMilestone() {
Project project = ProjectBuilder.builder().build();
project.setVersion("1.2.3.RC1");
project.setVersion("1.2.3-RC1");
assertThat(ArtifactoryRepository.forProject(project).getName()).isEqualTo("milestone");
}
@Test
void whenProjectVersionIsReleaseThenRepositoryIsRelease() {
Project project = ProjectBuilder.builder().build();
project.setVersion("1.2.3.RELEASE");
project.setVersion("1.2.3");
assertThat(ArtifactoryRepository.forProject(project).getName()).isEqualTo("release");
}
@Test
void whenProjectVersionIsBuildSnapshotThenRepositoryIsSnapshot() {
void whenProjectVersionIsSnapshotThenRepositoryIsSnapshot() {
Project project = ProjectBuilder.builder().build();
project.setVersion("1.2.3.BUILD-SNAPSHOT");
project.setVersion("1.2.3-SNAPSHOT");
assertThat(ArtifactoryRepository.forProject(project).getName()).isEqualTo("snapshot");
}

View File

@ -11,7 +11,7 @@ The pipeline can be deployed using the following command:
[source]
----
$ fly -t spring-boot set-pipeline -p spring-boot-2.3.x -c ci/pipeline.yml -l ci/parameters.yml
$ fly -t spring-boot set-pipeline -p spring-boot-2.4.x -c ci/pipeline.yml -l ci/parameters.yml
----
NOTE: This assumes that you have credhub integration configured with the appropriate

View File

@ -9,7 +9,7 @@ apt-get update
apt-get install --no-install-recommends -y ca-certificates net-tools libxml2-utils git curl libudev1 libxml2-utils iptables iproute2 jq
rm -rf /var/lib/apt/lists/*
curl https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.2/concourse-java.sh > /opt/concourse-java.sh
curl https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.3/concourse-java.sh > /opt/concourse-java.sh
###########################################################

View File

@ -6,7 +6,7 @@ github-repo-name: "spring-projects/spring-boot"
docker-hub-organization: "springci"
artifactory-server: "https://repo.spring.io"
branch: "master"
milestone: "2.3.x"
milestone: "2.4.x"
build-name: "spring-boot"
pipeline-name: "spring-boot"
concourse-url: "https://ci.spring.io"

View File

@ -77,7 +77,7 @@ resources:
repository: ((docker-hub-organization))/spring-boot-ci-image
username: ((docker-hub-username))
password: ((docker-hub-password))
tag: 2.3.x
tag: 2.4.x
- name: spring-boot-jdk11-ci-image
type: docker-image
icon: docker
@ -85,7 +85,7 @@ resources:
repository: ((docker-hub-organization))/spring-boot-jdk11-ci-image
username: ((docker-hub-username))
password: ((docker-hub-password))
tag: 2.3.x
tag: 2.4.x
- name: spring-boot-jdk14-ci-image
type: docker-image
icon: docker
@ -93,7 +93,7 @@ resources:
repository: ((docker-hub-organization))/spring-boot-jdk14-ci-image
username: ((docker-hub-username))
password: ((docker-hub-password))
tag: 2.3.x
tag: 2.4.x
- name: artifactory-repo
type: artifactory-resource
icon: package-variant

View File

@ -4,9 +4,6 @@ set -e
version=$( cat version/version )
milestone=${version}
if [[ $RELEASE_TYPE = "RELEASE" ]]; then
milestone=${version%.RELEASE}
fi
java -jar /github-release-notes-generator.jar \
--releasenotes.github.username=${GITHUB_USERNAME} \

View File

@ -1,4 +1,4 @@
version=2.3.1.BUILD-SNAPSHOT
version=2.4.0-SNAPSHOT
org.gradle.caching=true
org.gradle.parallel=true