Skip to content

Commit ffe7379

Browse files
authored
Merge pull request #1 from spring-projects/master
Update upstream
2 parents 520ce14 + 442225b commit ffe7379

File tree

952 files changed

+11558
-9694
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

952 files changed

+11558
-9694
lines changed

.mvn/wrapper/maven-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip

README.adoc

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
= Spring Boot image:https://ci.spring.io/api/v1/teams/spring-boot/pipelines/spring-boot/jobs/build/badge["Build Status", link="https://ci.spring.io/teams/spring-boot/pipelines/spring-boot?groups=Build"] image:https://badges.gitter.im/Join Chat.svg["Chat",link="https://gitter.im/spring-projects/spring-boot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"]
22
:docs: https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference
3+
:github: https://github.com/spring-projects/spring-boot
34

45
Spring Boot makes it easy to create Spring-powered, production-grade applications and
56
services with absolute minimum fuss. It takes an opinionated view of the Spring platform
@@ -22,12 +23,11 @@ diverge from the defaults
2223
2324
2425
== Installation and Getting Started
25-
The {docs}/htmlsingle/[reference documentation] includes detailed
26-
{docs}/htmlsingle/#getting-started-installing-spring-boot[installation instructions]
27-
as well as a comprehensive {docs}/htmlsingle/#getting-started-first-application[``getting
28-
started``] guide. Documentation is published in {docs}/htmlsingle/[HTML],
29-
{docs}/pdf/spring-boot-reference.pdf[PDF] and {docs}/epub/spring-boot-reference.epub[EPUB]
30-
formats.
26+
The {docs}/html/[reference documentation] includes detailed
27+
{docs}/html/getting-started.html#getting-started-installing-spring-boot[installation
28+
instructions] as well as a comprehensive
29+
{docs}/html/getting-started.html#getting-started-first-application[``getting started``]
30+
guide.
3131

3232
Here is a quick teaser of a complete Spring Boot application in Java:
3333

@@ -58,28 +58,28 @@ Here is a quick teaser of a complete Spring Boot application in Java:
5858
== Getting help
5959
Having trouble with Spring Boot? We'd like to help!
6060

61-
* Check the {docs}/htmlsingle/[reference documentation], especially the
62-
{docs}/htmlsingle/#howto[How-to's] -- they provide solutions to the most common
61+
* Check the {docs}/html/[reference documentation], especially the
62+
{docs}/html/howto.html#howto[How-to's] -- they provide solutions to the most common
6363
questions.
6464
* Learn the Spring basics -- Spring Boot builds on many other Spring projects, check
6565
the https://spring.io[spring.io] web-site for a wealth of reference documentation. If
6666
you are just starting out with Spring, try one of the https://spring.io/guides[guides].
67-
* If you are upgrading, read the https://github.com/spring-projects/spring-boot/wiki[release notes]
68-
for upgrade instructions and "new and noteworthy" features.
67+
* If you are upgrading, read the {github}/wiki[release notes] for upgrade instructions and
68+
"new and noteworthy" features.
6969
* Ask a question - we monitor https://stackoverflow.com[stackoverflow.com] for questions
7070
tagged with https://stackoverflow.com/tags/spring-boot[`spring-boot`]. You can also chat
7171
with the community on https://gitter.im/spring-projects/spring-boot[Gitter].
72-
* Report bugs with Spring Boot at https://github.com/spring-projects/spring-boot/issues[github.com/spring-projects/spring-boot/issues].
72+
* Report bugs with Spring Boot at {github}/issues[github.com/spring-projects/spring-boot/issues].
7373

7474

7575

7676
== Reporting Issues
7777
Spring Boot uses GitHub's integrated issue tracking system to record bugs and feature
7878
requests. If you want to raise an issue, please follow the recommendations below:
7979

80-
* Before you log a bug, please https://github.com/spring-projects/spring-boot/search?type=Issues[search the issue tracker]
81-
to see if someone has already reported the problem.
82-
* If the issue doesn't already exist, https://github.com/spring-projects/spring-boot/issues/new[create a new issue].
80+
* Before you log a bug, please search the {github}/issues[issue tracker] to see if someone
81+
has already reported the problem.
82+
* If the issue doesn't already exist, {github}/issues/new[create a new issue].
8383
* Please provide as much information as possible with the issue report, we like to know
8484
the version of Spring Boot that you are using, as well as your Operating System and
8585
JVM version.

ci/images/README.adoc

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
== CI Images
2+
3+
These images are used by CI to run the actual builds.
4+
5+
To build the image locally run the following from this directory:
6+
7+
----
8+
$ docker build --no-cache -f <image-folder>/Dockerfile .
9+
----
10+
11+
For example
12+
13+
----
14+
$ docker build --no-cache -f spring-boot-ci-image/Dockerfile .
15+
----
16+
17+
To test run:
18+
19+
----
20+
$ docker run -it --entrypoint /bin/bash <SHA> ✈
21+
----

ci/images/docker-lib.sh

+55-20
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# Ref: https://github.com/concourse/docker-image-resource/blob/master/assets/common.sh
1+
# Based on: https://github.com/concourse/docker-image-resource/blob/master/assets/common.sh
2+
3+
DOCKER_LOG_FILE=${DOCKER_LOG_FILE:-/tmp/docker.log}
4+
SKIP_PRIVILEGED=${SKIP_PRIVILEGED:-false}
5+
STARTUP_TIMEOUT=${STARTUP_TIMEOUT:-120}
26

37
sanitize_cgroups() {
48
mkdir -p /sys/fs/cgroup
@@ -13,7 +17,7 @@ sanitize_cgroups() {
1317
continue
1418
fi
1519

16-
grouping="$(cat /proc/self/cgroup | cut -d: -f2 | grep "\\<$sys\\>")"
20+
grouping="$(cat /proc/self/cgroup | cut -d: -f2 | grep "\\<$sys\\>")" || true
1721
if [ -z "$grouping" ]; then
1822
# subsystem not mounted anywhere; mount it on its own
1923
grouping="$sys"
@@ -38,40 +42,71 @@ sanitize_cgroups() {
3842
ln -s "$mountpoint" "/sys/fs/cgroup/$sys"
3943
fi
4044
done
45+
46+
if ! test -e /sys/fs/cgroup/systemd ; then
47+
mkdir /sys/fs/cgroup/systemd
48+
mount -t cgroup -o none,name=systemd none /sys/fs/cgroup/systemd
49+
fi
4150
}
4251

4352
start_docker() {
4453
mkdir -p /var/log
4554
mkdir -p /var/run
4655

47-
sanitize_cgroups
56+
if [ "$SKIP_PRIVILEGED" = "false" ]; then
57+
sanitize_cgroups
4858

49-
# check for /proc/sys being mounted readonly, as systemd does
50-
if grep '/proc/sys\s\+\w\+\s\+ro,' /proc/mounts >/dev/null; then
51-
mount -o remount,rw /proc/sys
59+
# check for /proc/sys being mounted readonly, as systemd does
60+
if grep '/proc/sys\s\+\w\+\s\+ro,' /proc/mounts >/dev/null; then
61+
mount -o remount,rw /proc/sys
62+
fi
5263
fi
5364

54-
local server_args=""
65+
local mtu=$(cat /sys/class/net/$(ip route get 8.8.8.8|awk '{ print $5 }')/mtu)
66+
local server_args="--mtu ${mtu}"
67+
local registry=""
68+
69+
server_args="${server_args}"
5570

56-
for registry in $1; do
71+
for registry in $3; do
5772
server_args="${server_args} --insecure-registry ${registry}"
5873
done
5974

60-
if [ -n "$2" ]; then
61-
server_args="${server_args} --registry-mirror=$2"
75+
if [ -n "$4" ]; then
76+
server_args="${server_args} --registry-mirror $4"
6277
fi
6378

64-
if [ -n "$3" ]; then
65-
server_args="${server_args} -g=$3"
79+
try_start() {
80+
dockerd --data-root /scratch/docker ${server_args} >$DOCKER_LOG_FILE 2>&1 &
81+
echo $! > /tmp/docker.pid
82+
83+
sleep 1
84+
85+
echo waiting for docker to come up...
86+
until docker info >/dev/null 2>&1; do
87+
sleep 1
88+
if ! kill -0 "$(cat /tmp/docker.pid)" 2>/dev/null; then
89+
return 1
90+
fi
91+
done
92+
}
93+
94+
export server_args DOCKER_LOG_FILE
95+
declare -fx try_start
96+
trap stop_docker EXIT
97+
98+
if ! timeout ${STARTUP_TIMEOUT} bash -ce 'while true; do try_start && break; done'; then
99+
echo Docker failed to start within ${STARTUP_TIMEOUT} seconds.
100+
return 1
66101
fi
102+
}
67103

68-
docker daemon --data-root /scratch/docker ${server_args} >/tmp/docker.log 2>&1 &
69-
echo $! > /tmp/docker.pid
104+
stop_docker() {
105+
local pid=$(cat /tmp/docker.pid)
106+
if [ -z "$pid" ]; then
107+
return 0
108+
fi
70109

71-
sleep 1
110+
kill -TERM $pid
111+
}
72112

73-
until docker info >/dev/null 2>&1; do
74-
echo waiting for docker to come up...
75-
sleep 1
76-
done
77-
}

ci/images/get-jdk-url.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
set -e
3+
4+
case "$1" in
5+
java8)
6+
echo "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u192-b12/OpenJDK8U-jdk_x64_linux_hotspot_8u192b12.tar.gz"
7+
;;
8+
java11)
9+
echo "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.1%2B13/OpenJDK11U-jdk_x64_linux_hotspot_11.0.1_13.tar.gz"
10+
;;
11+
*)
12+
echo $"Unknown java version"
13+
exit 1
14+
esac

ci/images/setup.sh

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
###########################################################
5+
# UTILS
6+
###########################################################
7+
8+
apt-get update
9+
apt-get install --no-install-recommends -y ca-certificates net-tools libxml2-utils git curl libudev1 libxml2-utils iptables iproute2 jq
10+
rm -rf /var/lib/apt/lists/*
11+
12+
curl https://github.com/raw/spring-io/concourse-java-scripts/v0.0.2/concourse-java.sh > /opt/concourse-java.sh
13+
14+
15+
###########################################################
16+
# JAVA
17+
###########################################################
18+
JDK_URL=$( ./get-jdk-url.sh $1 )
19+
case "$1" in
20+
java8)
21+
COMPONENTS=2
22+
;;
23+
java11)
24+
COMPONENTS=1
25+
;;
26+
*)
27+
echo $"Unknown java version"
28+
exit 1
29+
esac
30+
mkdir -p /opt/openjdk
31+
cd /opt/openjdk
32+
curl -L ${JDK_URL} | tar zx --strip-components=${COMPONENTS}
33+
test -f /opt/openjdk/bin/java
34+
35+
36+
###########################################################
37+
# DOCKER
38+
###########################################################
39+
40+
cd /
41+
curl -L https://download.docker.com/linux/static/stable/x86_64/docker-18.06.1-ce.tgz | tar zx
42+
mv /docker/* /bin/
43+
chmod +x /bin/docker*
44+
45+
export ENTRYKIT_VERSION=0.4.0
46+
curl -L https://github.com/progrium/entrykit/releases/download/v${ENTRYKIT_VERSION}/entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz | tar zx
47+
chmod +x entrykit && \
48+
mv entrykit /bin/entrykit && \
49+
entrykit --symlink
+8-30
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,11 @@
1-
FROM openjdk:8u181-jdk
1+
FROM ubuntu:bionic-20181018
22

3-
RUN apt-get update && \
4-
apt-get install -y git && \
5-
apt-get install -y libxml2-utils && \
6-
apt-get install -y jq
3+
ADD setup.sh /setup.sh
4+
ADD get-jdk-url.sh /get-jdk-url.sh
5+
RUN ./setup.sh java8
76

8-
ADD https://github.com/raw/spring-io/concourse-java-scripts/v0.0.2/concourse-java.sh /opt/
7+
ENV JAVA_HOME /opt/openjdk
8+
ENV PATH $JAVA_HOME/bin:$PATH
9+
ADD docker-lib.sh /docker-lib.sh
910

10-
ENV DOCKER_VERSION=17.05.0-ce \
11-
ENTRYKIT_VERSION=0.4.0
12-
13-
RUN apt-get update && \
14-
apt-get install -y curl && \
15-
apt-get install -y libudev1 && \
16-
apt-get install -y iptables && \
17-
curl https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz | tar zx && \
18-
mv /docker/* /bin/ && chmod +x /bin/docker*
19-
20-
# Install entrykit
21-
RUN curl -L https://github.com/progrium/entrykit/releases/download/v${ENTRYKIT_VERSION}/entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz | tar zx && \
22-
chmod +x entrykit && \
23-
mv entrykit /bin/entrykit && \
24-
entrykit --symlink
25-
26-
ADD https://github.com/raw/spring-projects/spring-boot/master/ci/images/docker-lib.sh /docker-lib.sh
27-
28-
ENTRYPOINT [ \
29-
"switch", \
30-
"shell=/bin/sh", "--", \
31-
"codep", \
32-
"/bin/docker daemon" \
33-
]
11+
ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ]

ci/images/spring-boot-jdk10-ci-image/Dockerfile

-33
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,11 @@
1-
FROM openjdk:11-ea-28-jdk
1+
FROM ubuntu:bionic-20181018
22

3-
RUN apt-get update && \
4-
apt-get install -y git && \
5-
apt-get install -y libxml2-utils && \
6-
apt-get install -y jq
3+
ADD setup.sh /setup.sh
4+
ADD get-jdk-url.sh /get-jdk-url.sh
5+
RUN ./setup.sh java11
76

8-
ADD https://github.com/raw/spring-io/concourse-java-scripts/v0.0.2/concourse-java.sh /opt/
7+
ENV JAVA_HOME /opt/openjdk
8+
ENV PATH $JAVA_HOME/bin:$PATH
9+
ADD docker-lib.sh /docker-lib.sh
910

10-
ENV DOCKER_VERSION=17.05.0-ce \
11-
ENTRYKIT_VERSION=0.4.0
12-
13-
RUN apt-get update && \
14-
apt-get install -y curl && \
15-
apt-get install -y libudev1 && \
16-
apt-get install -y iptables && \
17-
curl https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz | tar zx && \
18-
mv /docker/* /bin/ && chmod +x /bin/docker*
19-
20-
# Install entrykit
21-
RUN curl -L https://github.com/progrium/entrykit/releases/download/v${ENTRYKIT_VERSION}/entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz | tar zx && \
22-
chmod +x entrykit && \
23-
mv entrykit /bin/entrykit && \
24-
entrykit --symlink
25-
26-
ADD https://github.com/raw/spring-projects/spring-boot/master/ci/images/docker-lib.sh /docker-lib.sh
27-
28-
ENTRYPOINT [ \
29-
"switch", \
30-
"shell=/bin/sh", "--", \
31-
"codep", \
32-
"/bin/docker daemon" \
33-
]
11+
ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ]

0 commit comments

Comments
 (0)