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.Sync;
import org.springframework.boot.build.artifactory.ArtifactoryRepository;
import org.springframework.boot.build.artifacts.ArtifactRelease;
import org.springframework.util.StringUtils;
/**
@ -66,6 +66,7 @@ import org.springframework.util.StringUtils;
* </ul>
*
* @author Andy Wilkinson
* @author Scott Frederick
*/
class AsciidoctorConventions {
@ -128,10 +129,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);
}

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.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");

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 get-jdk-url.sh /get-jdk-url.sh
@ -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" ]

View File

@ -1,4 +1,4 @@
FROM ubuntu:focal-20220426
FROM ubuntu:focal-20220922
ADD setup.sh /setup.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 PATH $JAVA_HOME/bin:$PATH
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 get-jdk-url.sh /get-jdk-url.sh
@ -8,5 +8,3 @@ RUN ./setup.sh java8 java18
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" ]

View File

@ -1,4 +1,4 @@
FROM ubuntu:focal-20220426
FROM ubuntu:focal-20220922
ADD setup.sh /setup.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 releasescripts /release-scripts
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 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";

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");
* 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);

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-name: "spring-projects/spring-boot"
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
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))
GRADLE_ENTERPRISE_CACHE_USERNAME: ((gradle_enterprise_cache_user.username))
GRADLE_ENTERPRISE_CACHE_PASSWORD: ((gradle_enterprise_cache_user.password))
docker-hub-task-params: &docker-hub-task-params
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
@ -52,7 +53,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:
@ -85,41 +86,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
@ -170,25 +173,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-jdk18
type: registry-image
icon: docker
source:
<<: *registry-image-resource-source
<<: *ci-registry-image-resource-source
repository: ((docker-hub-organization))/spring-boot-ci-jdk18
- name: artifactory-repo
type: artifactory-resource
@ -198,6 +201,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
@ -265,7 +270,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
@ -273,7 +277,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
@ -281,7 +284,6 @@ jobs:
image: ci-image-jdk17
vars:
ci-image-name: ci-image-jdk17
<<: *docker-hub-mirror-vars
- task: build-ci-image-jdk18
privileged: true
file: git-repo/ci/tasks/build-ci-image.yml
@ -289,7 +291,6 @@ jobs:
image: ci-image-jdk18
vars:
ci-image-name: ci-image-jdk18
<<: *docker-hub-mirror-vars
- in_parallel:
- put: ci-image
params:
@ -625,8 +626,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
@ -656,8 +655,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
@ -717,8 +714,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

View File

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

View File

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

View File

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

View File

@ -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:

View File

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

View File

@ -12,6 +12,7 @@ params:
BRANCH:
CI: true
GRADLE_ENTERPRISE_ACCESS_KEY:
GRADLE_ENTERPRISE_CACHE_URL:
GRADLE_ENTERPRISE_CACHE_USERNAME:
GRADLE_ENTERPRISE_CACHE_PASSWORD:
GRADLE_ENTERPRISE_URL: https://ge.spring.io
@ -19,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

View File

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

View File

@ -8,6 +8,7 @@ outputs:
params:
RELEASE_TYPE:
CI: true
GRADLE_ENTERPRISE_CACHE_URL:
GRADLE_ENTERPRISE_CACHE_USERNAME:
GRADLE_ENTERPRISE_CACHE_PASSWORD:
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
xsi:type="setup:ResourceCreationTask"
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"
encoding="UTF-8">
<description>
Initialize JDT's package explorer to show working sets as
its root objects
</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
xsi:type="setup.p2:P2Task">
@ -78,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
@ -93,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
@ -104,11 +114,18 @@
</description>
</setupTask>
<setupTask
xsi:type="oomph:GradleImportTask">
xsi:type="oomph:GradleImportTask"
javaHome="${jre.location-1.8}">
<sourceLocator
rootFolder="${checkout.location}"
locateNestedProjects="true"/>
</setupTask>
<setupTask
xsi:type="oomph:GradleImportTask"
javaHome="${jre.location-1.8}">
<sourceLocator
rootFolder="${checkout.location}/buildSrc"/>
</setupTask>
<setupTask
xsi:type="setup.workingsets:WorkingSetTask">
<workingSet
@ -120,7 +137,7 @@
pattern="spring-boot.*"/>
<operand
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>
</workingSet>
<workingSet
@ -162,7 +179,7 @@
pattern="spring-boot-(.*-test|tests).*"/>
<operand
xsi:type="workingsets:ExclusionPredicate"
excludedWorkingSet="//@setupTasks.7/@workingSets.3"/>
excludedWorkingSet="//@setupTasks.8/@workingSets[name='spring-boot-smoke-tests']"/>
</predicate>
</workingSet>
</setupTask>

View File

@ -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'

View File

@ -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": {

View File

@ -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());

View File

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

View File

@ -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 don't 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>

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]]
==== 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.

View 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):

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:
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
----