Merge branch '2.5.x' into 2.6.x
This commit is contained in:
commit
60930c0285
@ -31,7 +31,7 @@ import org.gradle.api.Project;
|
||||
import org.gradle.api.tasks.PathSensitivity;
|
||||
import org.gradle.api.tasks.Sync;
|
||||
|
||||
import org.springframework.boot.build.artifactory.ArtifactoryRepository;
|
||||
import org.springframework.boot.build.artifacts.ArtifactRelease;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
@ -67,6 +67,7 @@ import org.springframework.util.StringUtils;
|
||||
* </ul>
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
* @author Scott Frederick
|
||||
*/
|
||||
class AsciidoctorConventions {
|
||||
|
||||
@ -130,10 +131,12 @@ class AsciidoctorConventions {
|
||||
}
|
||||
|
||||
private void configureCommonAttributes(Project project, AbstractAsciidoctorTask asciidoctorTask) {
|
||||
ArtifactRelease artifacts = ArtifactRelease.forProject(project);
|
||||
Map<String, Object> attributes = new HashMap<>();
|
||||
attributes.put("attribute-missing", "warn");
|
||||
attributes.put("github-tag", determineGitHubTag(project));
|
||||
attributes.put("spring-boot-artifactory-repo", ArtifactoryRepository.forProject(project));
|
||||
attributes.put("artifact-release-type", artifacts.getType());
|
||||
attributes.put("artifact-download-repo", artifacts.getDownloadRepo());
|
||||
attributes.put("revnumber", null);
|
||||
asciidoctorTask.attributes(attributes);
|
||||
}
|
||||
|
@ -1,60 +0,0 @@
|
||||
/*
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.build.artifactory;
|
||||
|
||||
import org.gradle.api.Project;
|
||||
|
||||
/**
|
||||
* An Artifactory repository to which a build of Spring Boot can be published.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public final class ArtifactoryRepository {
|
||||
|
||||
private final String name;
|
||||
|
||||
private ArtifactoryRepository(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public static ArtifactoryRepository forProject(Project project) {
|
||||
return new ArtifactoryRepository(determineArtifactoryRepo(project));
|
||||
}
|
||||
|
||||
private static String determineArtifactoryRepo(Project project) {
|
||||
String version = project.getVersion().toString();
|
||||
int modifierIndex = version.lastIndexOf('-');
|
||||
if (modifierIndex == -1) {
|
||||
return "release";
|
||||
}
|
||||
String type = version.substring(modifierIndex + 1);
|
||||
if (type.startsWith("M") || type.startsWith("RC")) {
|
||||
return "milestone";
|
||||
}
|
||||
return "snapshot";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
/*
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.build.artifacts;
|
||||
|
||||
import org.gradle.api.Project;
|
||||
|
||||
/**
|
||||
* Information about artifacts produced by a build.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
* @author Scott Frederick
|
||||
*/
|
||||
public final class ArtifactRelease {
|
||||
|
||||
private static final String SNAPSHOT = "snapshot";
|
||||
|
||||
private static final String MILESTONE = "milestone";
|
||||
|
||||
private static final String RELEASE = "release";
|
||||
|
||||
private static final String SPRING_REPO = "https://repo.spring.io/%s";
|
||||
|
||||
private static final String MAVEN_REPO = "https://repo.maven.apache.org/maven2";
|
||||
|
||||
private final String type;
|
||||
|
||||
private ArtifactRelease(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
public String getDownloadRepo() {
|
||||
return (this.isRelease()) ? MAVEN_REPO : String.format(SPRING_REPO, this.getType());
|
||||
}
|
||||
|
||||
public boolean isRelease() {
|
||||
return RELEASE.equals(this.type);
|
||||
}
|
||||
|
||||
public static ArtifactRelease forProject(Project project) {
|
||||
return new ArtifactRelease(determineReleaseType(project));
|
||||
}
|
||||
|
||||
private static String determineReleaseType(Project project) {
|
||||
String version = project.getVersion().toString();
|
||||
int modifierIndex = version.lastIndexOf('-');
|
||||
if (modifierIndex == -1) {
|
||||
return RELEASE;
|
||||
}
|
||||
String type = version.substring(modifierIndex + 1);
|
||||
if (type.startsWith("M") || type.startsWith("RC")) {
|
||||
return MILESTONE;
|
||||
}
|
||||
return SNAPSHOT;
|
||||
}
|
||||
|
||||
}
|
@ -23,6 +23,7 @@ import java.util.Map;
|
||||
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.gradle.api.DefaultTask;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.file.RegularFile;
|
||||
import org.gradle.api.provider.Provider;
|
||||
import org.gradle.api.tasks.InputFile;
|
||||
@ -31,13 +32,14 @@ import org.gradle.api.tasks.PathSensitive;
|
||||
import org.gradle.api.tasks.PathSensitivity;
|
||||
import org.gradle.api.tasks.TaskExecutionException;
|
||||
|
||||
import org.springframework.boot.build.artifactory.ArtifactoryRepository;
|
||||
import org.springframework.boot.build.artifacts.ArtifactRelease;
|
||||
|
||||
/**
|
||||
* Base class for generating a package manager definition file such as a Scoop manifest or
|
||||
* a Homebrew formula.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
public abstract class AbstractPackageManagerDefinitionTask extends DefaultTask {
|
||||
|
||||
@ -84,14 +86,19 @@ public abstract class AbstractPackageManagerDefinitionTask extends DefaultTask {
|
||||
getProject().copy((copy) -> {
|
||||
copy.from(this.template);
|
||||
copy.into(this.outputDir);
|
||||
Map<String, Object> properties = new HashMap<>(additionalProperties);
|
||||
properties.put("hash", sha256(this.archive.get().getAsFile()));
|
||||
properties.put("repo", ArtifactoryRepository.forProject(getProject()));
|
||||
properties.put("project", getProject());
|
||||
copy.expand(properties);
|
||||
copy.expand(getProperties(additionalProperties));
|
||||
});
|
||||
}
|
||||
|
||||
private Map<String, Object> getProperties(Map<String, Object> additionalProperties) {
|
||||
Map<String, Object> properties = new HashMap<>(additionalProperties);
|
||||
Project project = getProject();
|
||||
properties.put("hash", sha256(this.archive.get().getAsFile()));
|
||||
properties.put("repo", ArtifactRelease.forProject(project).getDownloadRepo());
|
||||
properties.put("project", project);
|
||||
return properties;
|
||||
}
|
||||
|
||||
private String sha256(File file) {
|
||||
try {
|
||||
MessageDigest digest = MessageDigest.getInstance("SHA-256");
|
||||
|
@ -1,60 +0,0 @@
|
||||
/*
|
||||
* Copyright 2012-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.build.artifactory;
|
||||
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.testfixtures.ProjectBuilder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link ArtifactoryRepository}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
class ArtifactoryRepositoryTests {
|
||||
|
||||
@Test
|
||||
void whenProjectVersionIsMilestoneThenRepositoryIsMilestone() {
|
||||
Project project = ProjectBuilder.builder().build();
|
||||
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");
|
||||
assertThat(ArtifactoryRepository.forProject(project).getName()).isEqualTo("milestone");
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenProjectVersionIsReleaseThenRepositoryIsRelease() {
|
||||
Project project = ProjectBuilder.builder().build();
|
||||
project.setVersion("1.2.3");
|
||||
assertThat(ArtifactoryRepository.forProject(project).getName()).isEqualTo("release");
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenProjectVersionIsSnapshotThenRepositoryIsSnapshot() {
|
||||
Project project = ProjectBuilder.builder().build();
|
||||
project.setVersion("1.2.3-SNAPSHOT");
|
||||
assertThat(ArtifactoryRepository.forProject(project).getName()).isEqualTo("snapshot");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
/*
|
||||
* Copyright 2012-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.build.artifacts;
|
||||
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.testfixtures.ProjectBuilder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link ArtifactRelease}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
* @author Scott Frederick
|
||||
*/
|
||||
class ArtifactReleaseTests {
|
||||
|
||||
@Test
|
||||
void whenProjectVersionIsSnapshotThenTypeIsSnapshot() {
|
||||
Project project = ProjectBuilder.builder().build();
|
||||
project.setVersion("1.2.3-SNAPSHOT");
|
||||
assertThat(ArtifactRelease.forProject(project).getType()).isEqualTo("snapshot");
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenProjectVersionIsMilestoneThenTypeIsMilestone() {
|
||||
Project project = ProjectBuilder.builder().build();
|
||||
project.setVersion("1.2.3-M1");
|
||||
assertThat(ArtifactRelease.forProject(project).getType()).isEqualTo("milestone");
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenProjectVersionIsReleaseCandidateThenTypeIsMilestone() {
|
||||
Project project = ProjectBuilder.builder().build();
|
||||
project.setVersion("1.2.3-RC1");
|
||||
assertThat(ArtifactRelease.forProject(project).getType()).isEqualTo("milestone");
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenProjectVersionIsReleaseThenTypeIsRelease() {
|
||||
Project project = ProjectBuilder.builder().build();
|
||||
project.setVersion("1.2.3");
|
||||
assertThat(ArtifactRelease.forProject(project).getType()).isEqualTo("release");
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenProjectVersionIsSnapshotThenRepositoryIsArtifactorySnapshot() {
|
||||
Project project = ProjectBuilder.builder().build();
|
||||
project.setVersion("1.2.3-SNAPSHOT");
|
||||
assertThat(ArtifactRelease.forProject(project).getDownloadRepo()).contains("repo.spring.io/snapshot");
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenProjectVersionIsMilestoneThenRepositoryIsArtifactoryMilestone() {
|
||||
Project project = ProjectBuilder.builder().build();
|
||||
project.setVersion("1.2.3-M1");
|
||||
assertThat(ArtifactRelease.forProject(project).getDownloadRepo()).contains("repo.spring.io/milestone");
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenProjectVersionIsReleaseCandidateThenRepositoryIsArtifactoryMilestone() {
|
||||
Project project = ProjectBuilder.builder().build();
|
||||
project.setVersion("1.2.3-RC1");
|
||||
assertThat(ArtifactRelease.forProject(project).getDownloadRepo()).contains("repo.spring.io/milestone");
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenProjectVersionIsReleaseThenRepositoryIsMavenCentral() {
|
||||
Project project = ProjectBuilder.builder().build();
|
||||
project.setVersion("1.2.3");
|
||||
assertThat(ArtifactRelease.forProject(project).getDownloadRepo())
|
||||
.contains("https://repo.maven.apache.org/maven2");
|
||||
}
|
||||
|
||||
}
|
@ -8,5 +8,3 @@ RUN ./setup.sh java11
|
||||
ENV JAVA_HOME /opt/openjdk
|
||||
ENV PATH $JAVA_HOME/bin:$PATH
|
||||
ADD docker-lib.sh /docker-lib.sh
|
||||
|
||||
ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ]
|
||||
|
@ -8,5 +8,3 @@ RUN ./setup.sh java8 java17
|
||||
ENV JAVA_HOME /opt/openjdk
|
||||
ENV PATH $JAVA_HOME/bin:$PATH
|
||||
ADD docker-lib.sh /docker-lib.sh
|
||||
|
||||
ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ]
|
||||
|
@ -8,5 +8,3 @@ RUN ./setup.sh java8 java19
|
||||
ENV JAVA_HOME /opt/openjdk
|
||||
ENV PATH $JAVA_HOME/bin:$PATH
|
||||
ADD docker-lib.sh /docker-lib.sh
|
||||
|
||||
ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ]
|
||||
|
@ -12,4 +12,3 @@ ADD docker-lib.sh /docker-lib.sh
|
||||
ADD build-release-scripts.sh /build-release-scripts.sh
|
||||
ADD releasescripts /release-scripts
|
||||
RUN ./build-release-scripts.sh
|
||||
ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ]
|
||||
|
@ -40,7 +40,7 @@ public class SdkmanService {
|
||||
|
||||
private static final String SDKMAN_URL = "https://vendors.sdkman.io/";
|
||||
|
||||
private static final String DOWNLOAD_URL = "https://repo.spring.io/simple/libs-release-local/org/springframework/boot/spring-boot-cli/"
|
||||
private static final String DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-cli/"
|
||||
+ "%s/spring-boot-cli-%s-bin.zip";
|
||||
|
||||
private static final String CHANGELOG_URL = "https://github.com/spring-projects/spring-boot/releases/tag/v%s";
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -55,7 +55,7 @@ class SdkmanServiceTests {
|
||||
@Test
|
||||
void publishWhenMakeDefaultTrue() {
|
||||
setupExpectation("https://vendors.sdkman.io/release",
|
||||
"{\"candidate\": \"springboot\", \"version\": \"1.2.3\", \"url\": \"https://repo.spring.io/simple/libs-release-local/org/springframework/boot/spring-boot-cli/1.2.3/spring-boot-cli-1.2.3-bin.zip\"}");
|
||||
"{\"candidate\": \"springboot\", \"version\": \"1.2.3\", \"url\": \"https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-cli/1.2.3/spring-boot-cli-1.2.3-bin.zip\"}");
|
||||
setupExpectation("https://vendors.sdkman.io/default", "{\"candidate\": \"springboot\", \"version\": \"1.2.3\"}",
|
||||
HttpMethod.PUT);
|
||||
setupExpectation("https://vendors.sdkman.io/announce/struct",
|
||||
@ -67,7 +67,7 @@ class SdkmanServiceTests {
|
||||
@Test
|
||||
void publishWhenMakeDefaultFalse() {
|
||||
setupExpectation("https://vendors.sdkman.io/release",
|
||||
"{\"candidate\": \"springboot\", \"version\": \"1.2.3\", \"url\": \"https://repo.spring.io/simple/libs-release-local/org/springframework/boot/spring-boot-cli/1.2.3/spring-boot-cli-1.2.3-bin.zip\"}");
|
||||
"{\"candidate\": \"springboot\", \"version\": \"1.2.3\", \"url\": \"https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-cli/1.2.3/spring-boot-cli-1.2.3-bin.zip\"}");
|
||||
setupExpectation("https://vendors.sdkman.io/announce/struct",
|
||||
"{\"candidate\": \"springboot\", \"version\": \"1.2.3\", \"hashtag\": \"springboot\", \"url\": \"https://github.com/spring-projects/spring-boot/releases/tag/v1.2.3\"}");
|
||||
this.service.publish("1.2.3", false);
|
||||
|
@ -1,6 +1,3 @@
|
||||
email-server: "smtp.svc.pivotal.io"
|
||||
email-from: "ci@spring.io"
|
||||
email-to: ["spring-boot-dev@pivotal.io"]
|
||||
github-repo: "https://github.com/spring-projects/spring-boot.git"
|
||||
github-repo-name: "spring-projects/spring-boot"
|
||||
homebrew-tap-repo: "https://github.com/spring-io/homebrew-tap.git"
|
||||
|
@ -7,11 +7,10 @@ anchors:
|
||||
registry-image-resource-source: ®istry-image-resource-source
|
||||
username: ((docker-hub-username))
|
||||
password: ((docker-hub-password))
|
||||
ci-registry-image-resource-source: &ci-registry-image-resource-source
|
||||
username: ((docker-hub-username))
|
||||
password: ((docker-hub-password))
|
||||
tag: ((milestone))
|
||||
registry_mirror:
|
||||
host: ((docker-hub-mirror))
|
||||
username: ((docker-hub-mirror-username))
|
||||
password: ((docker-hub-mirror-password))
|
||||
gradle-enterprise-task-params: &gradle-enterprise-task-params
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ((gradle_enterprise_secret_access_key))
|
||||
GRADLE_ENTERPRISE_CACHE_URL: ((gradle_enterprise_cache_url))
|
||||
@ -21,6 +20,7 @@ anchors:
|
||||
DOCKER_HUB_MIRROR: ((docker-hub-mirror))
|
||||
DOCKER_HUB_USERNAME: ((docker-hub-username))
|
||||
DOCKER_HUB_PASSWORD: ((docker-hub-password))
|
||||
DOCKER_HUB_AUTH: ((docker-hub-auth))
|
||||
github-task-params: &github-task-params
|
||||
GITHUB_REPO: spring-boot
|
||||
GITHUB_ORGANIZATION: spring-projects
|
||||
@ -61,7 +61,7 @@ anchors:
|
||||
repo: libs-snapshot-local
|
||||
folder: distribution-repository
|
||||
build_uri: "https://ci.spring.io/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME}"
|
||||
build_number: "${BUILD_PIPELINE_NAME}-${BUILD_JOB_NAME}-${BUILD_NAME}"
|
||||
build_number: "${BUILD_JOB_NAME}-${BUILD_NAME}"
|
||||
disable_checksum_uploads: true
|
||||
threads: 8
|
||||
artifact_set:
|
||||
@ -94,41 +94,43 @@ anchors:
|
||||
gradle-publish-params: &gradle-publish-params
|
||||
GRADLE_PUBLISH_KEY: ((gradle-publish-key))
|
||||
GRADLE_PUBLISH_SECRET: ((gradle-publish-secret))
|
||||
docker-hub-mirror-vars: &docker-hub-mirror-vars
|
||||
docker-hub-mirror: ((docker-hub-mirror))
|
||||
docker-hub-mirror-username: ((docker-hub-mirror-username))
|
||||
docker-hub-mirror-password: ((docker-hub-mirror-password))
|
||||
resource_types:
|
||||
- name: registry-image
|
||||
type: registry-image
|
||||
source:
|
||||
<<: *registry-image-resource-source
|
||||
repository: concourse/registry-image-resource
|
||||
tag: 1.5.0
|
||||
tag: 1.7.1
|
||||
- name: artifactory-resource
|
||||
type: registry-image
|
||||
source:
|
||||
<<: *registry-image-resource-source
|
||||
repository: springio/artifactory-resource
|
||||
tag: 0.0.17
|
||||
tag: 0.0.18
|
||||
- name: pull-request
|
||||
type: registry-image
|
||||
source:
|
||||
<<: *registry-image-resource-source
|
||||
repository: teliaoss/github-pr-resource
|
||||
tag: v0.23.0
|
||||
- name: github-status-resource
|
||||
type: registry-image
|
||||
source:
|
||||
<<: *registry-image-resource-source
|
||||
repository: dpb587/github-status-resource
|
||||
tag: master
|
||||
- name: slack-notification
|
||||
type: registry-image
|
||||
source:
|
||||
<<: *registry-image-resource-source
|
||||
repository: cfcommunity/slack-notification-resource
|
||||
tag: latest
|
||||
- name: github-release
|
||||
type: registry-image
|
||||
source:
|
||||
<<: *registry-image-resource-source
|
||||
repository: concourse/github-release-resource
|
||||
tag: 1.5.5
|
||||
tag: 1.8.0
|
||||
resources:
|
||||
- name: git-repo
|
||||
type: git
|
||||
@ -179,25 +181,25 @@ resources:
|
||||
type: registry-image
|
||||
icon: docker
|
||||
source:
|
||||
<<: *registry-image-resource-source
|
||||
<<: *ci-registry-image-resource-source
|
||||
repository: ((docker-hub-organization))/spring-boot-ci
|
||||
- name: ci-image-jdk11
|
||||
type: registry-image
|
||||
icon: docker
|
||||
source:
|
||||
<<: *registry-image-resource-source
|
||||
<<: *ci-registry-image-resource-source
|
||||
repository: ((docker-hub-organization))/spring-boot-ci-jdk11
|
||||
- name: ci-image-jdk17
|
||||
type: registry-image
|
||||
icon: docker
|
||||
source:
|
||||
<<: *registry-image-resource-source
|
||||
<<: *ci-registry-image-resource-source
|
||||
repository: ((docker-hub-organization))/spring-boot-ci-jdk17
|
||||
- name: ci-image-jdk19
|
||||
type: registry-image
|
||||
icon: docker
|
||||
source:
|
||||
<<: *registry-image-resource-source
|
||||
<<: *ci-registry-image-resource-source
|
||||
repository: ((docker-hub-organization))/spring-boot-ci-jdk19
|
||||
- name: paketo-builder-base-image
|
||||
type: registry-image
|
||||
@ -213,6 +215,8 @@ resources:
|
||||
username: ((artifactory-username))
|
||||
password: ((artifactory-password))
|
||||
build_name: ((build-name))
|
||||
build_number_prefix: "${BUILD_PIPELINE_NAME}-"
|
||||
check_limit: 500
|
||||
- name: repo-status-build
|
||||
type: github-status-resource
|
||||
icon: eye-check-outline
|
||||
@ -280,7 +284,6 @@ jobs:
|
||||
image: ci-image
|
||||
vars:
|
||||
ci-image-name: ci-image
|
||||
<<: *docker-hub-mirror-vars
|
||||
- task: build-ci-image-jdk11
|
||||
privileged: true
|
||||
file: git-repo/ci/tasks/build-ci-image.yml
|
||||
@ -288,7 +291,6 @@ jobs:
|
||||
image: ci-image-jdk11
|
||||
vars:
|
||||
ci-image-name: ci-image-jdk11
|
||||
<<: *docker-hub-mirror-vars
|
||||
- task: build-ci-image-jdk17
|
||||
privileged: true
|
||||
file: git-repo/ci/tasks/build-ci-image.yml
|
||||
@ -296,7 +298,6 @@ jobs:
|
||||
image: ci-image-jdk17
|
||||
vars:
|
||||
ci-image-name: ci-image-jdk17
|
||||
<<: *docker-hub-mirror-vars
|
||||
- task: build-ci-image-jdk19
|
||||
privileged: true
|
||||
file: git-repo/ci/tasks/build-ci-image.yml
|
||||
@ -304,7 +305,6 @@ jobs:
|
||||
image: ci-image-jdk19
|
||||
vars:
|
||||
ci-image-name: ci-image-jdk19
|
||||
<<: *docker-hub-mirror-vars
|
||||
- in_parallel:
|
||||
- put: ci-image
|
||||
params:
|
||||
@ -640,8 +640,6 @@ jobs:
|
||||
RELEASE_TYPE: M
|
||||
GITHUB_USERNAME: ((github-username))
|
||||
GITHUB_TOKEN: ((github-ci-release-token))
|
||||
vars:
|
||||
<<: *docker-hub-mirror-vars
|
||||
- put: github-pre-release
|
||||
params:
|
||||
name: generated-changelog/tag
|
||||
@ -671,8 +669,6 @@ jobs:
|
||||
RELEASE_TYPE: RC
|
||||
GITHUB_USERNAME: ((github-username))
|
||||
GITHUB_TOKEN: ((github-ci-release-token))
|
||||
vars:
|
||||
<<: *docker-hub-mirror-vars
|
||||
- put: github-pre-release
|
||||
params:
|
||||
name: generated-changelog/tag
|
||||
@ -732,8 +728,6 @@ jobs:
|
||||
RELEASE_TYPE: RELEASE
|
||||
GITHUB_USERNAME: ((github-username))
|
||||
GITHUB_TOKEN: ((github-ci-release-token))
|
||||
vars:
|
||||
<<: *docker-hub-mirror-vars
|
||||
- put: github-release
|
||||
params:
|
||||
name: generated-changelog/tag
|
||||
|
@ -43,7 +43,7 @@ if [[ $current = $latest ]]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
milestone_response=$( curl -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/milestones\?state\=open )
|
||||
milestone_response=$( curl -s -u ${GITHUB_USERNAME}:${GITHUB_PASSWORD} https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/milestones\?state\=open )
|
||||
milestone_result=$( jq -r -c --arg MILESTONE "$MILESTONE" '.[] | select(has("title")) | select(.title==$MILESTONE)' <<< "$milestone_response" )
|
||||
if [[ ${milestone_result} = "null" || ${milestone_result} = "" ]]; then
|
||||
echo "Could not parse milestone: $milestone_response"
|
||||
@ -51,7 +51,7 @@ if [[ ${milestone_result} = "null" || ${milestone_result} = "" ]]; then
|
||||
fi
|
||||
|
||||
milestone_number=$( jq -r '.number' <<< "$milestone_result" )
|
||||
existing_tasks=$( curl -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/issues\?labels\=type:%20task\&state\=open\&creator\=spring-builds\&milestone\=${milestone_number} )
|
||||
existing_tasks=$( curl -u ${GITHUB_USERNAME}:${GITHUB_PASSWORD} -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/issues\?labels\=type:%20task\&state\=open\&creator\=spring-builds\&milestone\=${milestone_number} )
|
||||
existing_jdk_issues=$( jq -r -c --arg TITLE "$ISSUE_TITLE" '.[] | select(has("title")) | select(.title==$TITLE)' <<< "$existing_tasks" )
|
||||
|
||||
if [[ ${existing_jdk_issues} = "" ]]; then
|
||||
|
@ -11,8 +11,8 @@ if [[ $current = $latest ]]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
milestone_number=$( curl -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/milestones\?state\=open | jq -c --arg MILESTONE "$MILESTONE" '.[] | select(.title==$MILESTONE)' | jq -r '.number')
|
||||
existing_tasks=$( curl -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/issues\?labels\=type:%20task\&state\=open\&creator\=spring-builds\&milestone\=${milestone_number} )
|
||||
milestone_number=$( curl -u ${GITHUB_USERNAME}:${GITHUB_PASSWORD} -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/milestones\?state\=open | jq -c --arg MILESTONE "$MILESTONE" '.[] | select(.title==$MILESTONE)' | jq -r '.number')
|
||||
existing_tasks=$( curl -u ${GITHUB_USERNAME}:${GITHUB_PASSWORD} -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/issues\?labels\=type:%20task\&state\=open\&creator\=spring-builds\&milestone\=${milestone_number} )
|
||||
existing_upgrade_issues=$( echo "$existing_tasks" | jq -c --arg TITLE "$ISSUE_TITLE" '.[] | select(.title==$TITLE)' )
|
||||
|
||||
if [[ ${existing_upgrade_issues} = "" ]]; then
|
||||
|
@ -7,7 +7,7 @@ git clone homebrew-tap-repo updated-homebrew-tap-repo > /dev/null
|
||||
|
||||
if [[ $LATEST_GA = true ]]; then
|
||||
pushd updated-homebrew-tap-repo > /dev/null
|
||||
curl https://repo.spring.io/libs-release-local/org/springframework/boot/spring-boot-cli/${version}/spring-boot-cli-${version}-homebrew.rb --output spring-boot-cli-${version}-homebrew.rb
|
||||
curl https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-cli/${version}/spring-boot-cli-${version}-homebrew.rb --output spring-boot-cli-${version}-homebrew.rb
|
||||
rm spring-boot.rb
|
||||
mv spring-boot-cli-*.rb spring-boot.rb
|
||||
git config user.name "Spring Builds" > /dev/null
|
||||
|
@ -5,10 +5,8 @@ image_resource:
|
||||
source:
|
||||
repository: concourse/oci-build-task
|
||||
tag: 0.10.0
|
||||
registry_mirror:
|
||||
host: ((docker-hub-mirror))
|
||||
username: ((docker-hub-mirror-username))
|
||||
password: ((docker-hub-mirror-password))
|
||||
username: ((docker-hub-username))
|
||||
password: ((docker-hub-password))
|
||||
inputs:
|
||||
- name: ci-images-git-repo
|
||||
outputs:
|
||||
|
@ -20,8 +20,12 @@ params:
|
||||
run:
|
||||
path: bash
|
||||
args:
|
||||
- -ec
|
||||
- |
|
||||
source /docker-lib.sh
|
||||
start_docker $DOCKER_HUB_MIRROR
|
||||
${PWD}/git-repo/ci/scripts/build-project.sh
|
||||
- "-ec"
|
||||
- |
|
||||
mkdir -p /root/.docker
|
||||
cat > /root/.docker/config.json <<EOF
|
||||
{ "auths": { "https://index.docker.io/v1/": { "auth": "$DOCKER_HUB_AUTH" }}}
|
||||
EOF
|
||||
source /docker-lib.sh
|
||||
start_docker $DOCKER_HUB_MIRROR
|
||||
${PWD}/git-repo/ci/scripts/build-project.sh
|
||||
|
@ -5,10 +5,8 @@ image_resource:
|
||||
source:
|
||||
repository: springio/github-changelog-generator
|
||||
tag: '0.0.8'
|
||||
registry_mirror:
|
||||
host: ((docker-hub-mirror))
|
||||
username: ((docker-hub-mirror-username))
|
||||
password: ((docker-hub-mirror-password))
|
||||
username: ((docker-hub-username))
|
||||
password: ((docker-hub-password))
|
||||
inputs:
|
||||
- name: git-repo
|
||||
- name: artifactory-repo
|
||||
|
@ -1 +1 @@
|
||||
copyright-year=2012-2022
|
||||
copyright-year=2012-2023
|
||||
|
@ -90,8 +90,6 @@
|
||||
name="org.eclipse.wst.server_adapters.feature.feature.group"/>
|
||||
<requirement
|
||||
name="org.eclipse.wst.web_ui.feature.feature.group"/>
|
||||
<requirement
|
||||
name="org.sonatype.m2e.buildhelper.feature.feature.group"/>
|
||||
<requirement
|
||||
name="org.springframework.boot.ide.main.feature.feature.group"/>
|
||||
<requirement
|
||||
@ -105,7 +103,7 @@
|
||||
<repository
|
||||
url="https://repo.spring.io/javaformat-eclipse-update-site/"/>
|
||||
<repository
|
||||
url="https://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-buildhelper/0.15.0/N/0.15.0.201405280027/"/>
|
||||
url="https://repo.maven.apache.org/maven2/.m2e/connectors/m2eclipse-buildhelper/0.15.0/N/0.15.0.201405280027/"/>
|
||||
<repository
|
||||
url="https://download.springsource.com/release/TOOLS/sts4/update/latest/"/>
|
||||
<repository
|
||||
@ -139,7 +137,7 @@
|
||||
pattern="spring-boot.*"/>
|
||||
<operand
|
||||
xsi:type="workingsets:ExclusionPredicate"
|
||||
excludedWorkingSet="//@setupTasks.8/@workingSets[name='spring-boot-smoke-tests']"/>
|
||||
excludedWorkingSet="//@setupTasks.8/@workingSets[name='spring-boot-smoke-tests'] //@setupTasks.8/@workingSets[name='spring-boot-starters'] //@setupTasks.8/@workingSets[name='spring-boot-tests'] //@setupTasks.8/@workingSets[name='spring-boot-tools']"/>
|
||||
</predicate>
|
||||
</workingSet>
|
||||
<workingSet
|
||||
|
@ -2,7 +2,7 @@ require 'formula'
|
||||
|
||||
class SpringBoot < Formula
|
||||
homepage 'https://spring.io/projects/spring-boot'
|
||||
url 'https://repo.spring.io/${repo}/org/springframework/boot/spring-boot-cli/${project.version}/spring-boot-cli-${project.version}-bin.tar.gz'
|
||||
url '${repo}/org/springframework/boot/spring-boot-cli/${project.version}/spring-boot-cli-${project.version}-bin.tar.gz'
|
||||
version '${project.version}'
|
||||
sha256 '${hash}'
|
||||
head 'https://github.com/spring-projects/spring-boot.git'
|
||||
|
@ -3,7 +3,7 @@
|
||||
"version": "${scoopVersion}",
|
||||
"license": "Apache 2.0",
|
||||
"hash": "${hash}",
|
||||
"url": "https://repo.spring.io/${repo}/org/springframework/boot/spring-boot-cli/${project.version}/spring-boot-cli-${project.version}-bin.zip",
|
||||
"url": "${repo}/org/springframework/boot/spring-boot-cli/${project.version}/spring-boot-cli-${project.version}-bin.zip",
|
||||
"extract_dir": "spring-${project.version}",
|
||||
"bin": "bin\\\\spring.bat",
|
||||
"suggest": {
|
||||
|
@ -57,7 +57,7 @@ class MavenResolverGrapeEngineTests {
|
||||
private GrapeEngine createGrapeEngine(RepositoryConfiguration... additionalRepositories) {
|
||||
List<RepositoryConfiguration> repositoryConfigurations = new ArrayList<>();
|
||||
repositoryConfigurations
|
||||
.add(new RepositoryConfiguration("central", URI.create("https://repo1.maven.org/maven2"), false));
|
||||
.add(new RepositoryConfiguration("central", URI.create("https://repo.maven.apache.org/maven2"), false));
|
||||
repositoryConfigurations.addAll(Arrays.asList(additionalRepositories));
|
||||
DependencyResolutionContext dependencyResolutionContext = new DependencyResolutionContext();
|
||||
dependencyResolutionContext.addDependencyManagement(new SpringBootDependenciesDependencyManagement());
|
||||
|
@ -11,7 +11,7 @@
|
||||
:docinfo: shared,private
|
||||
:attribute-missing: warn
|
||||
:chomp: default headers packages
|
||||
:spring-boot-artifactory-repo: snapshot
|
||||
:artifact-release-type: snapshot
|
||||
:github-tag: main
|
||||
:spring-boot-version: current
|
||||
:github-repo: spring-projects/spring-boot
|
||||
|
@ -61,8 +61,8 @@ Open your favorite text editor and add the following:
|
||||
|
||||
<!-- Additional lines to be added here... -->
|
||||
|
||||
ifeval::["{spring-boot-artifactory-repo}" != "release"]
|
||||
<!-- (you do not need this if you are using a .RELEASE version) -->
|
||||
ifeval::["{artifact-release-type}" != "release"]
|
||||
<!-- (you only need this if you are using a milestone or snapshot version) -->
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-snapshots</id>
|
||||
|
@ -74,13 +74,16 @@ You do not need to use the CLI to work with Spring Boot, but it is a quick way t
|
||||
|
||||
[[getting-started.installing.cli.manual-installation]]
|
||||
==== Manual Installation
|
||||
You can download the Spring CLI distribution from the Spring software repository:
|
||||
ifeval::["{artifact-release-type}" == "snapshot"]
|
||||
You can download one of the `spring-boot-cli-\*-bin.zip` or `spring-boot-cli-*-bin.tar.gz` files from the {artifact-download-repo}/org/springframework/boot/spring-boot-cli/{spring-boot-version}/[Spring software repository].
|
||||
endif::[]
|
||||
ifeval::["{artifact-release-type}" != "snapshot"]
|
||||
You can download the Spring CLI distribution from one of the following locations:
|
||||
|
||||
* https://repo.spring.io/{spring-boot-artifactory-repo}/org/springframework/boot/spring-boot-cli/{spring-boot-version}/spring-boot-cli-{spring-boot-version}-bin.zip[spring-boot-cli-{spring-boot-version}-bin.zip]
|
||||
* https://repo.spring.io/{spring-boot-artifactory-repo}/org/springframework/boot/spring-boot-cli/{spring-boot-version}/spring-boot-cli-{spring-boot-version}-bin.tar.gz[spring-boot-cli-{spring-boot-version}-bin.tar.gz]
|
||||
* {artifact-download-repo}/org/springframework/boot/spring-boot-cli/{spring-boot-version}/spring-boot-cli-{spring-boot-version}-bin.zip[spring-boot-cli-{spring-boot-version}-bin.zip]
|
||||
* {artifact-download-repo}/org/springframework/boot/spring-boot-cli/{spring-boot-version}/spring-boot-cli-{spring-boot-version}-bin.tar.gz[spring-boot-cli-{spring-boot-version}-bin.tar.gz]
|
||||
endif::[]
|
||||
|
||||
Cutting edge
|
||||
https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-cli/[snapshot distributions] are also available.
|
||||
|
||||
Once downloaded, follow the {github-raw}/spring-boot-project/spring-boot-cli/src/main/content/INSTALL.txt[INSTALL.txt] instructions from the unpacked archive.
|
||||
In summary, there is a `spring` script (`spring.bat` for Windows) in a `bin/` directory in the `.zip` file.
|
||||
|
@ -2,7 +2,7 @@
|
||||
= Getting Started
|
||||
To get started with the plugin it needs to be applied to your project.
|
||||
|
||||
ifeval::["{spring-boot-artifactory-repo}" == "release"]
|
||||
ifeval::["{artifact-release-type}" == "release"]
|
||||
The plugin is https://plugins.gradle.org/plugin/org.springframework.boot[published to Gradle's plugin portal] and can be applied using the `plugins` block:
|
||||
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
|
||||
.Groovy
|
||||
@ -16,7 +16,7 @@ include::../gradle/getting-started/apply-plugin-release.gradle[]
|
||||
include::../gradle/getting-started/apply-plugin-release.gradle.kts[]
|
||||
----
|
||||
endif::[]
|
||||
ifeval::["{spring-boot-artifactory-repo}" == "milestone"]
|
||||
ifeval::["{artifact-release-type}" == "milestone"]
|
||||
The plugin is published to the Spring milestones repository.
|
||||
Gradle can be configured to use the milestones repository and the plugin can then be applied using the `plugins` block.
|
||||
To configure Gradle to use the milestones repository, add the following to your `settings.gradle` (Groovy) or `settings.gradle.kts` (Kotlin):
|
||||
@ -47,7 +47,7 @@ include::../gradle/getting-started/apply-plugin-release.gradle[]
|
||||
include::../gradle/getting-started/apply-plugin-release.gradle.kts[]
|
||||
----
|
||||
endif::[]
|
||||
ifeval::["{spring-boot-artifactory-repo}" == "snapshot"]
|
||||
ifeval::["{artifact-release-type}" == "snapshot"]
|
||||
The plugin is published to the Spring snapshots repository.
|
||||
Gradle can be configured to use the snapshots repository and the plugin can then be applied using the `plugins` block.
|
||||
To configure Gradle to use the snapshots repository, add the following to your `settings.gradle` (Groovy) or `settings.gradle.kts` (Kotlin):
|
||||
|
@ -58,7 +58,7 @@ The `SpringBootPlugin` class provides a `BOM_COORDINATES` constant that can be u
|
||||
|
||||
First, configure the project to depend on the Spring Boot plugin but do not apply it:
|
||||
|
||||
ifeval::["{spring-boot-artifactory-repo}" == "release"]
|
||||
ifeval::["{artifact-release-type}" == "release"]
|
||||
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
|
||||
.Groovy
|
||||
----
|
||||
@ -71,7 +71,7 @@ include::../gradle/managing-dependencies/depend-on-plugin-release.gradle[]
|
||||
include::../gradle/managing-dependencies/depend-on-plugin-release.gradle.kts[]
|
||||
----
|
||||
endif::[]
|
||||
ifeval::["{spring-boot-artifactory-repo}" == "milestone"]
|
||||
ifeval::["{artifact-release-type}" == "milestone"]
|
||||
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
|
||||
.Groovy
|
||||
----
|
||||
@ -83,7 +83,7 @@ include::../gradle/managing-dependencies/depend-on-plugin-milestone.gradle[]
|
||||
include::../gradle/managing-dependencies/depend-on-plugin-release.gradle.kts[]
|
||||
----
|
||||
endif::[]
|
||||
ifeval::["{spring-boot-artifactory-repo}" == "snapshot"]
|
||||
ifeval::["{artifact-release-type}" == "snapshot"]
|
||||
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
|
||||
.Groovy
|
||||
----
|
||||
|
Loading…
x
Reference in New Issue
Block a user