Backport build and CI concerns

Backport build and CI concerns primarily related to repo.spring.io
changes and Docker config.
This commit is contained in:
Phillip Webb 2023-05-10 10:06:26 -07:00
parent e2365ff2a4
commit 9af19370a6
32 changed files with 278 additions and 216 deletions

View File

@ -30,7 +30,7 @@ import org.gradle.api.Project;
import org.gradle.api.tasks.PathSensitivity; import org.gradle.api.tasks.PathSensitivity;
import org.gradle.api.tasks.Sync; 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; import org.springframework.util.StringUtils;
/** /**
@ -66,6 +66,7 @@ import org.springframework.util.StringUtils;
* </ul> * </ul>
* *
* @author Andy Wilkinson * @author Andy Wilkinson
* @author Scott Frederick
*/ */
class AsciidoctorConventions { class AsciidoctorConventions {
@ -128,10 +129,12 @@ class AsciidoctorConventions {
} }
private void configureCommonAttributes(Project project, AbstractAsciidoctorTask asciidoctorTask) { private void configureCommonAttributes(Project project, AbstractAsciidoctorTask asciidoctorTask) {
ArtifactRelease artifacts = ArtifactRelease.forProject(project);
Map<String, Object> attributes = new HashMap<>(); Map<String, Object> attributes = new HashMap<>();
attributes.put("attribute-missing", "warn"); attributes.put("attribute-missing", "warn");
attributes.put("github-tag", determineGitHubTag(project)); 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); attributes.put("revnumber", null);
asciidoctorTask.attributes(attributes); asciidoctorTask.attributes(attributes);
} }

View File

@ -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";
}
}

View File

@ -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;
}
}

View File

@ -23,6 +23,7 @@ import java.util.Map;
import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.codec.digest.DigestUtils;
import org.gradle.api.DefaultTask; import org.gradle.api.DefaultTask;
import org.gradle.api.Project;
import org.gradle.api.file.RegularFile; import org.gradle.api.file.RegularFile;
import org.gradle.api.provider.Provider; import org.gradle.api.provider.Provider;
import org.gradle.api.tasks.InputFile; 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.PathSensitivity;
import org.gradle.api.tasks.TaskExecutionException; 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 * Base class for generating a package manager definition file such as a Scoop manifest or
* a Homebrew formula. * a Homebrew formula.
* *
* @author Andy Wilkinson * @author Andy Wilkinson
* @author Phillip Webb
*/ */
public abstract class AbstractPackageManagerDefinitionTask extends DefaultTask { public abstract class AbstractPackageManagerDefinitionTask extends DefaultTask {
@ -84,14 +86,19 @@ public abstract class AbstractPackageManagerDefinitionTask extends DefaultTask {
getProject().copy((copy) -> { getProject().copy((copy) -> {
copy.from(this.template); copy.from(this.template);
copy.into(this.outputDir); copy.into(this.outputDir);
Map<String, Object> properties = new HashMap<>(additionalProperties); copy.expand(getProperties(additionalProperties));
properties.put("hash", sha256(this.archive.get().getAsFile()));
properties.put("repo", ArtifactoryRepository.forProject(getProject()));
properties.put("project", getProject());
copy.expand(properties);
}); });
} }
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) { private String sha256(File file) {
try { try {
MessageDigest digest = MessageDigest.getInstance("SHA-256"); MessageDigest digest = MessageDigest.getInstance("SHA-256");

View File

@ -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");
}
}

View File

@ -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");
}
}

View File

@ -1,4 +1,4 @@
FROM ubuntu:focal-20220426 FROM ubuntu:focal-20220922
ADD setup.sh /setup.sh ADD setup.sh /setup.sh
ADD get-jdk-url.sh /get-jdk-url.sh ADD get-jdk-url.sh /get-jdk-url.sh
@ -8,5 +8,3 @@ RUN ./setup.sh java11
ENV JAVA_HOME /opt/openjdk ENV JAVA_HOME /opt/openjdk
ENV PATH $JAVA_HOME/bin:$PATH ENV PATH $JAVA_HOME/bin:$PATH
ADD docker-lib.sh /docker-lib.sh ADD docker-lib.sh /docker-lib.sh
ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ]

View File

@ -1,4 +1,4 @@
FROM ubuntu:focal-20220426 FROM ubuntu:focal-20220922
ADD setup.sh /setup.sh ADD setup.sh /setup.sh
ADD get-jdk-url.sh /get-jdk-url.sh ADD get-jdk-url.sh /get-jdk-url.sh
@ -8,5 +8,3 @@ RUN ./setup.sh java8 java17
ENV JAVA_HOME /opt/openjdk ENV JAVA_HOME /opt/openjdk
ENV PATH $JAVA_HOME/bin:$PATH ENV PATH $JAVA_HOME/bin:$PATH
ADD docker-lib.sh /docker-lib.sh ADD docker-lib.sh /docker-lib.sh
ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ]

View File

@ -1,4 +1,4 @@
FROM ubuntu:focal-20220426 FROM ubuntu:focal-20220922
ADD setup.sh /setup.sh ADD setup.sh /setup.sh
ADD get-jdk-url.sh /get-jdk-url.sh ADD get-jdk-url.sh /get-jdk-url.sh
@ -8,5 +8,3 @@ RUN ./setup.sh java8 java18
ENV JAVA_HOME /opt/openjdk ENV JAVA_HOME /opt/openjdk
ENV PATH $JAVA_HOME/bin:$PATH ENV PATH $JAVA_HOME/bin:$PATH
ADD docker-lib.sh /docker-lib.sh ADD docker-lib.sh /docker-lib.sh
ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ]

View File

@ -1,4 +1,4 @@
FROM ubuntu:focal-20220426 FROM ubuntu:focal-20220922
ADD setup.sh /setup.sh ADD setup.sh /setup.sh
ADD get-jdk-url.sh /get-jdk-url.sh ADD get-jdk-url.sh /get-jdk-url.sh
@ -12,4 +12,3 @@ ADD docker-lib.sh /docker-lib.sh
ADD build-release-scripts.sh /build-release-scripts.sh ADD build-release-scripts.sh /build-release-scripts.sh
ADD releasescripts /release-scripts ADD releasescripts /release-scripts
RUN ./build-release-scripts.sh RUN ./build-release-scripts.sh
ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ]

View File

@ -40,7 +40,7 @@ public class SdkmanService {
private static final String SDKMAN_URL = "https://vendors.sdkman.io/"; 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"; + "%s/spring-boot-cli-%s-bin.zip";
private static final String CHANGELOG_URL = "https://github.com/spring-projects/spring-boot/releases/tag/v%s"; private static final String CHANGELOG_URL = "https://github.com/spring-projects/spring-boot/releases/tag/v%s";

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -55,7 +55,7 @@ class SdkmanServiceTests {
@Test @Test
void publishWhenMakeDefaultTrue() { void publishWhenMakeDefaultTrue() {
setupExpectation("https://vendors.sdkman.io/release", 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\"}", setupExpectation("https://vendors.sdkman.io/default", "{\"candidate\": \"springboot\", \"version\": \"1.2.3\"}",
HttpMethod.PUT); HttpMethod.PUT);
setupExpectation("https://vendors.sdkman.io/announce/struct", setupExpectation("https://vendors.sdkman.io/announce/struct",
@ -67,7 +67,7 @@ class SdkmanServiceTests {
@Test @Test
void publishWhenMakeDefaultFalse() { void publishWhenMakeDefaultFalse() {
setupExpectation("https://vendors.sdkman.io/release", 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", 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\"}"); "{\"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); this.service.publish("1.2.3", false);

View File

@ -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: "https://github.com/spring-projects/spring-boot.git"
github-repo-name: "spring-projects/spring-boot" github-repo-name: "spring-projects/spring-boot"
homebrew-tap-repo: "https://github.com/spring-io/homebrew-tap.git" homebrew-tap-repo: "https://github.com/spring-io/homebrew-tap.git"

View File

@ -7,19 +7,20 @@ anchors:
registry-image-resource-source: &registry-image-resource-source registry-image-resource-source: &registry-image-resource-source
username: ((docker-hub-username)) username: ((docker-hub-username))
password: ((docker-hub-password)) password: ((docker-hub-password))
ci-registry-image-resource-source: &ci-registry-image-resource-source
username: ((docker-hub-username))
password: ((docker-hub-password))
tag: ((milestone)) 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-task-params: &gradle-enterprise-task-params
GRADLE_ENTERPRISE_ACCESS_KEY: ((gradle_enterprise_secret_access_key)) GRADLE_ENTERPRISE_ACCESS_KEY: ((gradle_enterprise_secret_access_key))
GRADLE_ENTERPRISE_CACHE_URL: ((gradle_enterprise_cache_url))
GRADLE_ENTERPRISE_CACHE_USERNAME: ((gradle_enterprise_cache_user.username)) GRADLE_ENTERPRISE_CACHE_USERNAME: ((gradle_enterprise_cache_user.username))
GRADLE_ENTERPRISE_CACHE_PASSWORD: ((gradle_enterprise_cache_user.password)) GRADLE_ENTERPRISE_CACHE_PASSWORD: ((gradle_enterprise_cache_user.password))
docker-hub-task-params: &docker-hub-task-params docker-hub-task-params: &docker-hub-task-params
DOCKER_HUB_MIRROR: ((docker-hub-mirror)) DOCKER_HUB_MIRROR: ((docker-hub-mirror))
DOCKER_HUB_USERNAME: ((docker-hub-username)) DOCKER_HUB_USERNAME: ((docker-hub-username))
DOCKER_HUB_PASSWORD: ((docker-hub-password)) DOCKER_HUB_PASSWORD: ((docker-hub-password))
DOCKER_HUB_AUTH: ((docker-hub-auth))
github-task-params: &github-task-params github-task-params: &github-task-params
GITHUB_REPO: spring-boot GITHUB_REPO: spring-boot
GITHUB_ORGANIZATION: spring-projects GITHUB_ORGANIZATION: spring-projects
@ -52,7 +53,7 @@ anchors:
repo: libs-snapshot-local repo: libs-snapshot-local
folder: distribution-repository 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_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 disable_checksum_uploads: true
threads: 8 threads: 8
artifact_set: artifact_set:
@ -85,41 +86,43 @@ anchors:
gradle-publish-params: &gradle-publish-params gradle-publish-params: &gradle-publish-params
GRADLE_PUBLISH_KEY: ((gradle-publish-key)) GRADLE_PUBLISH_KEY: ((gradle-publish-key))
GRADLE_PUBLISH_SECRET: ((gradle-publish-secret)) 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: resource_types:
- name: registry-image - name: registry-image
type: registry-image type: registry-image
source: source:
<<: *registry-image-resource-source
repository: concourse/registry-image-resource repository: concourse/registry-image-resource
tag: 1.5.0 tag: 1.7.1
- name: artifactory-resource - name: artifactory-resource
type: registry-image type: registry-image
source: source:
<<: *registry-image-resource-source
repository: springio/artifactory-resource repository: springio/artifactory-resource
tag: 0.0.17 tag: 0.0.18
- name: pull-request - name: pull-request
type: registry-image type: registry-image
source: source:
<<: *registry-image-resource-source
repository: teliaoss/github-pr-resource repository: teliaoss/github-pr-resource
tag: v0.23.0 tag: v0.23.0
- name: github-status-resource - name: github-status-resource
type: registry-image type: registry-image
source: source:
<<: *registry-image-resource-source
repository: dpb587/github-status-resource repository: dpb587/github-status-resource
tag: master tag: master
- name: slack-notification - name: slack-notification
type: registry-image type: registry-image
source: source:
<<: *registry-image-resource-source
repository: cfcommunity/slack-notification-resource repository: cfcommunity/slack-notification-resource
tag: latest tag: latest
- name: github-release - name: github-release
type: registry-image type: registry-image
source: source:
<<: *registry-image-resource-source
repository: concourse/github-release-resource repository: concourse/github-release-resource
tag: 1.5.5 tag: 1.8.0
resources: resources:
- name: git-repo - name: git-repo
type: git type: git
@ -170,25 +173,25 @@ resources:
type: registry-image type: registry-image
icon: docker icon: docker
source: source:
<<: *registry-image-resource-source <<: *ci-registry-image-resource-source
repository: ((docker-hub-organization))/spring-boot-ci repository: ((docker-hub-organization))/spring-boot-ci
- name: ci-image-jdk11 - name: ci-image-jdk11
type: registry-image type: registry-image
icon: docker icon: docker
source: source:
<<: *registry-image-resource-source <<: *ci-registry-image-resource-source
repository: ((docker-hub-organization))/spring-boot-ci-jdk11 repository: ((docker-hub-organization))/spring-boot-ci-jdk11
- name: ci-image-jdk17 - name: ci-image-jdk17
type: registry-image type: registry-image
icon: docker icon: docker
source: source:
<<: *registry-image-resource-source <<: *ci-registry-image-resource-source
repository: ((docker-hub-organization))/spring-boot-ci-jdk17 repository: ((docker-hub-organization))/spring-boot-ci-jdk17
- name: ci-image-jdk18 - name: ci-image-jdk18
type: registry-image type: registry-image
icon: docker icon: docker
source: source:
<<: *registry-image-resource-source <<: *ci-registry-image-resource-source
repository: ((docker-hub-organization))/spring-boot-ci-jdk18 repository: ((docker-hub-organization))/spring-boot-ci-jdk18
- name: artifactory-repo - name: artifactory-repo
type: artifactory-resource type: artifactory-resource
@ -198,6 +201,8 @@ resources:
username: ((artifactory-username)) username: ((artifactory-username))
password: ((artifactory-password)) password: ((artifactory-password))
build_name: ((build-name)) build_name: ((build-name))
build_number_prefix: "${BUILD_PIPELINE_NAME}-"
check_limit: 500
- name: repo-status-build - name: repo-status-build
type: github-status-resource type: github-status-resource
icon: eye-check-outline icon: eye-check-outline
@ -265,7 +270,6 @@ jobs:
image: ci-image image: ci-image
vars: vars:
ci-image-name: ci-image ci-image-name: ci-image
<<: *docker-hub-mirror-vars
- task: build-ci-image-jdk11 - task: build-ci-image-jdk11
privileged: true privileged: true
file: git-repo/ci/tasks/build-ci-image.yml file: git-repo/ci/tasks/build-ci-image.yml
@ -273,7 +277,6 @@ jobs:
image: ci-image-jdk11 image: ci-image-jdk11
vars: vars:
ci-image-name: ci-image-jdk11 ci-image-name: ci-image-jdk11
<<: *docker-hub-mirror-vars
- task: build-ci-image-jdk17 - task: build-ci-image-jdk17
privileged: true privileged: true
file: git-repo/ci/tasks/build-ci-image.yml file: git-repo/ci/tasks/build-ci-image.yml
@ -281,7 +284,6 @@ jobs:
image: ci-image-jdk17 image: ci-image-jdk17
vars: vars:
ci-image-name: ci-image-jdk17 ci-image-name: ci-image-jdk17
<<: *docker-hub-mirror-vars
- task: build-ci-image-jdk18 - task: build-ci-image-jdk18
privileged: true privileged: true
file: git-repo/ci/tasks/build-ci-image.yml file: git-repo/ci/tasks/build-ci-image.yml
@ -289,7 +291,6 @@ jobs:
image: ci-image-jdk18 image: ci-image-jdk18
vars: vars:
ci-image-name: ci-image-jdk18 ci-image-name: ci-image-jdk18
<<: *docker-hub-mirror-vars
- in_parallel: - in_parallel:
- put: ci-image - put: ci-image
params: params:
@ -625,8 +626,6 @@ jobs:
RELEASE_TYPE: M RELEASE_TYPE: M
GITHUB_USERNAME: ((github-username)) GITHUB_USERNAME: ((github-username))
GITHUB_TOKEN: ((github-ci-release-token)) GITHUB_TOKEN: ((github-ci-release-token))
vars:
<<: *docker-hub-mirror-vars
- put: github-pre-release - put: github-pre-release
params: params:
name: generated-changelog/tag name: generated-changelog/tag
@ -656,8 +655,6 @@ jobs:
RELEASE_TYPE: RC RELEASE_TYPE: RC
GITHUB_USERNAME: ((github-username)) GITHUB_USERNAME: ((github-username))
GITHUB_TOKEN: ((github-ci-release-token)) GITHUB_TOKEN: ((github-ci-release-token))
vars:
<<: *docker-hub-mirror-vars
- put: github-pre-release - put: github-pre-release
params: params:
name: generated-changelog/tag name: generated-changelog/tag
@ -717,8 +714,6 @@ jobs:
RELEASE_TYPE: RELEASE RELEASE_TYPE: RELEASE
GITHUB_USERNAME: ((github-username)) GITHUB_USERNAME: ((github-username))
GITHUB_TOKEN: ((github-ci-release-token)) GITHUB_TOKEN: ((github-ci-release-token))
vars:
<<: *docker-hub-mirror-vars
- put: github-release - put: github-release
params: params:
name: generated-changelog/tag name: generated-changelog/tag

View File

@ -43,7 +43,7 @@ if [[ $current = $latest ]]; then
exit 0; exit 0;
fi 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" ) milestone_result=$( jq -r -c --arg MILESTONE "$MILESTONE" '.[] | select(has("title")) | select(.title==$MILESTONE)' <<< "$milestone_response" )
if [[ ${milestone_result} = "null" || ${milestone_result} = "" ]]; then if [[ ${milestone_result} = "null" || ${milestone_result} = "" ]]; then
echo "Could not parse milestone: $milestone_response" echo "Could not parse milestone: $milestone_response"
@ -51,7 +51,7 @@ if [[ ${milestone_result} = "null" || ${milestone_result} = "" ]]; then
fi fi
milestone_number=$( jq -r '.number' <<< "$milestone_result" ) 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" ) existing_jdk_issues=$( jq -r -c --arg TITLE "$ISSUE_TITLE" '.[] | select(has("title")) | select(.title==$TITLE)' <<< "$existing_tasks" )
if [[ ${existing_jdk_issues} = "" ]]; then if [[ ${existing_jdk_issues} = "" ]]; then

View File

@ -11,8 +11,8 @@ if [[ $current = $latest ]]; then
exit 0; exit 0;
fi 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') 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 -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_upgrade_issues=$( echo "$existing_tasks" | jq -c --arg TITLE "$ISSUE_TITLE" '.[] | select(.title==$TITLE)' ) existing_upgrade_issues=$( echo "$existing_tasks" | jq -c --arg TITLE "$ISSUE_TITLE" '.[] | select(.title==$TITLE)' )
if [[ ${existing_upgrade_issues} = "" ]]; then if [[ ${existing_upgrade_issues} = "" ]]; then

View File

@ -7,7 +7,7 @@ git clone homebrew-tap-repo updated-homebrew-tap-repo > /dev/null
if [[ $LATEST_GA = true ]]; then if [[ $LATEST_GA = true ]]; then
pushd updated-homebrew-tap-repo > /dev/null 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 rm spring-boot.rb
mv spring-boot-cli-*.rb spring-boot.rb mv spring-boot-cli-*.rb spring-boot.rb
git config user.name "Spring Builds" > /dev/null git config user.name "Spring Builds" > /dev/null

View File

@ -5,10 +5,8 @@ image_resource:
source: source:
repository: concourse/oci-build-task repository: concourse/oci-build-task
tag: 0.10.0 tag: 0.10.0
registry_mirror: username: ((docker-hub-username))
host: ((docker-hub-mirror)) password: ((docker-hub-password))
username: ((docker-hub-mirror-username))
password: ((docker-hub-mirror-password))
inputs: inputs:
- name: ci-images-git-repo - name: ci-images-git-repo
outputs: outputs:

View File

@ -8,6 +8,7 @@ params:
BRANCH: BRANCH:
CI: true CI: true
GRADLE_ENTERPRISE_ACCESS_KEY: GRADLE_ENTERPRISE_ACCESS_KEY:
GRADLE_ENTERPRISE_CACHE_URL:
GRADLE_ENTERPRISE_CACHE_USERNAME: GRADLE_ENTERPRISE_CACHE_USERNAME:
GRADLE_ENTERPRISE_CACHE_PASSWORD: GRADLE_ENTERPRISE_CACHE_PASSWORD:
GRADLE_ENTERPRISE_URL: https://ge.spring.io GRADLE_ENTERPRISE_URL: https://ge.spring.io

View File

@ -12,6 +12,7 @@ params:
BRANCH: BRANCH:
CI: true CI: true
GRADLE_ENTERPRISE_ACCESS_KEY: GRADLE_ENTERPRISE_ACCESS_KEY:
GRADLE_ENTERPRISE_CACHE_URL:
GRADLE_ENTERPRISE_CACHE_USERNAME: GRADLE_ENTERPRISE_CACHE_USERNAME:
GRADLE_ENTERPRISE_CACHE_PASSWORD: GRADLE_ENTERPRISE_CACHE_PASSWORD:
GRADLE_ENTERPRISE_URL: https://ge.spring.io GRADLE_ENTERPRISE_URL: https://ge.spring.io
@ -19,8 +20,12 @@ params:
run: run:
path: bash path: bash
args: args:
- -ec - "-ec"
- | - |
source /docker-lib.sh mkdir -p /root/.docker
start_docker $DOCKER_HUB_MIRROR cat > /root/.docker/config.json <<EOF
${PWD}/git-repo/ci/scripts/build-project.sh { "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

View File

@ -4,11 +4,9 @@ image_resource:
type: registry-image type: registry-image
source: source:
repository: springio/github-changelog-generator repository: springio/github-changelog-generator
tag: '0.0.7' tag: '0.0.8'
registry_mirror: username: ((docker-hub-username))
host: ((docker-hub-mirror)) password: ((docker-hub-password))
username: ((docker-hub-mirror-username))
password: ((docker-hub-mirror-password))
inputs: inputs:
- name: git-repo - name: git-repo
- name: artifactory-repo - name: artifactory-repo

View File

@ -8,6 +8,7 @@ outputs:
params: params:
RELEASE_TYPE: RELEASE_TYPE:
CI: true CI: true
GRADLE_ENTERPRISE_CACHE_URL:
GRADLE_ENTERPRISE_CACHE_USERNAME: GRADLE_ENTERPRISE_CACHE_USERNAME:
GRADLE_ENTERPRISE_CACHE_PASSWORD: GRADLE_ENTERPRISE_CACHE_PASSWORD:
GRADLE_ENTERPRISE_URL: https://ge.spring.io GRADLE_ENTERPRISE_URL: https://ge.spring.io

View File

@ -1 +1 @@
copyright-year=2012-2022 copyright-year=2012-2023

View File

@ -44,13 +44,25 @@
<setupTask <setupTask
xsi:type="setup:ResourceCreationTask" xsi:type="setup:ResourceCreationTask"
excludedTriggers="STARTUP MANUAL" excludedTriggers="STARTUP MANUAL"
content="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&#xD;&#xA;&lt;section name=&quot;Workbench&quot;>&#xD;&#xA;&#x9;&lt;section name=&quot;org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart&quot;>&#xD;&#xA;&#x9;&#x9;&lt;item value=&quot;true&quot; key=&quot;group_libraries&quot;/>&#xD;&#xA;&#x9;&#x9;&lt;item value=&quot;false&quot; key=&quot;linkWithEditor&quot;/>&#xD;&#xA;&#x9;&#x9;&lt;item value=&quot;2&quot; key=&quot;layout&quot;/>&#xD;&#xA;&#x9;&#x9;&lt;item value=&quot;2&quot; key=&quot;rootMode&quot;/>&#xD;&#xA;&#x9;&#x9;&lt;item value=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;packageExplorer configured=&amp;quot;true&amp;quot; group_libraries=&amp;quot;1&amp;quot; layout=&amp;quot;2&amp;quot; linkWithEditor=&amp;quot;0&amp;quot; rootMode=&amp;quot;2&amp;quot; sortWorkingSets=&amp;quot;false&amp;quot; workingSetName=&amp;quot;&amp;quot;&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;localWorkingSetManager&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;workingSet editPageId=&amp;quot;org.eclipse.jdt.internal.ui.OthersWorkingSet&amp;quot; factoryID=&amp;quot;org.eclipse.ui.internal.WorkingSetFactory&amp;quot; id=&amp;quot;1382792884467_1&amp;quot; label=&amp;quot;Other Projects&amp;quot; name=&amp;quot;Other Projects&amp;quot;/&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;/localWorkingSetManager&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;activeWorkingSet workingSetName=&amp;quot;Other Projects&amp;quot;/&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;allWorkingSets workingSetName=&amp;quot;Other Projects&amp;quot;/&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;/packageExplorer&amp;gt;&quot; key=&quot;memento&quot;/>&#xD;&#xA;&#x9;&lt;/section>&#xD;&#xA;&lt;/section>&#xD;&#xA;"
targetURL="${workspace.location|uri}/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml" targetURL="${workspace.location|uri}/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml"
encoding="UTF-8"> encoding="UTF-8">
<description> <description>
Initialize JDT's package explorer to show working sets as Initialize JDT's package explorer to show working sets as
its root objects its root objects
</description> </description>
<content>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
&lt;section name=&quot;Workbench&quot;>
&lt;section name=&quot;org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart&quot;>
&lt;item value=&quot;true&quot; key=&quot;group_libraries&quot;/>
&lt;item value=&quot;false&quot; key=&quot;linkWithEditor&quot;/>
&lt;item value=&quot;2&quot; key=&quot;layout&quot;/>
&lt;item value=&quot;2&quot; key=&quot;rootMode&quot;/>
&lt;item value=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;packageExplorer configured=&amp;quot;true&amp;quot; group_libraries=&amp;quot;1&amp;quot; layout=&amp;quot;2&amp;quot; linkWithEditor=&amp;quot;0&amp;quot; rootMode=&amp;quot;2&amp;quot; sortWorkingSets=&amp;quot;false&amp;quot; workingSetName=&amp;quot;&amp;quot;&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;localWorkingSetManager&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;workingSet editPageId=&amp;quot;org.eclipse.jdt.internal.ui.OthersWorkingSet&amp;quot; factoryID=&amp;quot;org.eclipse.ui.internal.WorkingSetFactory&amp;quot; id=&amp;quot;1382792884467_1&amp;quot; label=&amp;quot;Other Projects&amp;quot; name=&amp;quot;Other Projects&amp;quot;/&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;/localWorkingSetManager&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;activeWorkingSet workingSetName=&amp;quot;Other Projects&amp;quot;/&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;allWorkingSets workingSetName=&amp;quot;Other Projects&amp;quot;/&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;/packageExplorer&amp;gt;&quot; key=&quot;memento&quot;/>
&lt;/section>
&lt;/section>
</content>
</setupTask> </setupTask>
<setupTask <setupTask
xsi:type="setup.p2:P2Task"> xsi:type="setup.p2:P2Task">
@ -78,8 +90,6 @@
name="org.eclipse.wst.server_adapters.feature.feature.group"/> name="org.eclipse.wst.server_adapters.feature.feature.group"/>
<requirement <requirement
name="org.eclipse.wst.web_ui.feature.feature.group"/> name="org.eclipse.wst.web_ui.feature.feature.group"/>
<requirement
name="org.sonatype.m2e.buildhelper.feature.feature.group"/>
<requirement <requirement
name="org.springframework.boot.ide.main.feature.feature.group"/> name="org.springframework.boot.ide.main.feature.feature.group"/>
<requirement <requirement
@ -93,7 +103,7 @@
<repository <repository
url="https://repo.spring.io/javaformat-eclipse-update-site/"/> url="https://repo.spring.io/javaformat-eclipse-update-site/"/>
<repository <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 <repository
url="https://download.springsource.com/release/TOOLS/sts4/update/latest/"/> url="https://download.springsource.com/release/TOOLS/sts4/update/latest/"/>
<repository <repository
@ -104,11 +114,18 @@
</description> </description>
</setupTask> </setupTask>
<setupTask <setupTask
xsi:type="oomph:GradleImportTask"> xsi:type="oomph:GradleImportTask"
javaHome="${jre.location-1.8}">
<sourceLocator <sourceLocator
rootFolder="${checkout.location}" rootFolder="${checkout.location}"
locateNestedProjects="true"/> locateNestedProjects="true"/>
</setupTask> </setupTask>
<setupTask
xsi:type="oomph:GradleImportTask"
javaHome="${jre.location-1.8}">
<sourceLocator
rootFolder="${checkout.location}/buildSrc"/>
</setupTask>
<setupTask <setupTask
xsi:type="setup.workingsets:WorkingSetTask"> xsi:type="setup.workingsets:WorkingSetTask">
<workingSet <workingSet
@ -120,7 +137,7 @@
pattern="spring-boot.*"/> pattern="spring-boot.*"/>
<operand <operand
xsi:type="workingsets:ExclusionPredicate" xsi:type="workingsets:ExclusionPredicate"
excludedWorkingSet="//@setupTasks.7/@workingSets.3 //@setupTasks.7/@workingSets.2 //@setupTasks.7/@workingSets.4 //@setupTasks.7/@workingSets.1"/> 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> </predicate>
</workingSet> </workingSet>
<workingSet <workingSet
@ -162,7 +179,7 @@
pattern="spring-boot-(.*-test|tests).*"/> pattern="spring-boot-(.*-test|tests).*"/>
<operand <operand
xsi:type="workingsets:ExclusionPredicate" xsi:type="workingsets:ExclusionPredicate"
excludedWorkingSet="//@setupTasks.7/@workingSets.3"/> excludedWorkingSet="//@setupTasks.8/@workingSets[name='spring-boot-smoke-tests']"/>
</predicate> </predicate>
</workingSet> </workingSet>
</setupTask> </setupTask>

View File

@ -2,7 +2,7 @@ require 'formula'
class SpringBoot < Formula class SpringBoot < Formula
homepage 'https://spring.io/projects/spring-boot' 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}' version '${project.version}'
sha256 '${hash}' sha256 '${hash}'
head 'https://github.com/spring-projects/spring-boot.git' head 'https://github.com/spring-projects/spring-boot.git'

View File

@ -3,7 +3,7 @@
"version": "${scoopVersion}", "version": "${scoopVersion}",
"license": "Apache 2.0", "license": "Apache 2.0",
"hash": "${hash}", "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}", "extract_dir": "spring-${project.version}",
"bin": "bin\\\\spring.bat", "bin": "bin\\\\spring.bat",
"suggest": { "suggest": {

View File

@ -57,7 +57,7 @@ class MavenResolverGrapeEngineTests {
private GrapeEngine createGrapeEngine(RepositoryConfiguration... additionalRepositories) { private GrapeEngine createGrapeEngine(RepositoryConfiguration... additionalRepositories) {
List<RepositoryConfiguration> repositoryConfigurations = new ArrayList<>(); List<RepositoryConfiguration> repositoryConfigurations = new ArrayList<>();
repositoryConfigurations 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)); repositoryConfigurations.addAll(Arrays.asList(additionalRepositories));
DependencyResolutionContext dependencyResolutionContext = new DependencyResolutionContext(); DependencyResolutionContext dependencyResolutionContext = new DependencyResolutionContext();
dependencyResolutionContext.addDependencyManagement(new SpringBootDependenciesDependencyManagement()); dependencyResolutionContext.addDependencyManagement(new SpringBootDependenciesDependencyManagement());

View File

@ -11,7 +11,7 @@
:docinfo: shared,private :docinfo: shared,private
:attribute-missing: warn :attribute-missing: warn
:chomp: default headers packages :chomp: default headers packages
:spring-boot-artifactory-repo: snapshot :artifact-release-type: snapshot
:github-tag: main :github-tag: main
:spring-boot-version: current :spring-boot-version: current
:github-repo: spring-projects/spring-boot :github-repo: spring-projects/spring-boot

View File

@ -61,8 +61,8 @@ Open your favorite text editor and add the following:
<!-- Additional lines to be added here... --> <!-- Additional lines to be added here... -->
ifeval::["{spring-boot-artifactory-repo}" != "release"] ifeval::["{artifact-release-type}" != "release"]
<!-- (you don't need this if you are using a .RELEASE version) --> <!-- (you only need this if you are using a milestone or snapshot version) -->
<repositories> <repositories>
<repository> <repository>
<id>spring-snapshots</id> <id>spring-snapshots</id>

View File

@ -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]] [[getting-started.installing.cli.manual-installation]]
==== 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] * {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]
* 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.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. 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. In summary, there is a `spring` script (`spring.bat` for Windows) in a `bin/` directory in the `.zip` file.

View File

@ -2,7 +2,7 @@
= Getting Started = Getting Started
To get started with the plugin it needs to be applied to your project. 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: 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"] [source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
.Groovy .Groovy
@ -16,7 +16,7 @@ include::../gradle/getting-started/apply-plugin-release.gradle[]
include::../gradle/getting-started/apply-plugin-release.gradle.kts[] include::../gradle/getting-started/apply-plugin-release.gradle.kts[]
---- ----
endif::[] endif::[]
ifeval::["{spring-boot-artifactory-repo}" == "milestone"] ifeval::["{artifact-release-type}" == "milestone"]
The plugin is published to the Spring milestones repository. 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. 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): 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[] include::../gradle/getting-started/apply-plugin-release.gradle.kts[]
---- ----
endif::[] endif::[]
ifeval::["{spring-boot-artifactory-repo}" == "snapshot"] ifeval::["{artifact-release-type}" == "snapshot"]
The plugin is published to the Spring snapshots repository. 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. 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): To configure Gradle to use the snapshots repository, add the following to your `settings.gradle` (Groovy) or `settings.gradle.kts` (Kotlin):

View File

@ -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: 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"] [source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
.Groovy .Groovy
---- ----
@ -71,7 +71,7 @@ include::../gradle/managing-dependencies/depend-on-plugin-release.gradle[]
include::../gradle/managing-dependencies/depend-on-plugin-release.gradle.kts[] include::../gradle/managing-dependencies/depend-on-plugin-release.gradle.kts[]
---- ----
endif::[] endif::[]
ifeval::["{spring-boot-artifactory-repo}" == "milestone"] ifeval::["{artifact-release-type}" == "milestone"]
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"] [source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
.Groovy .Groovy
---- ----
@ -83,7 +83,7 @@ include::../gradle/managing-dependencies/depend-on-plugin-milestone.gradle[]
include::../gradle/managing-dependencies/depend-on-plugin-release.gradle.kts[] include::../gradle/managing-dependencies/depend-on-plugin-release.gradle.kts[]
---- ----
endif::[] endif::[]
ifeval::["{spring-boot-artifactory-repo}" == "snapshot"] ifeval::["{artifact-release-type}" == "snapshot"]
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"] [source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
.Groovy .Groovy
---- ----