Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
8d3ab1cc
Commit
8d3ab1cc
authored
Mar 18, 2020
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish "Add Java 14 CI"
See gh-20413
parent
f0e57ed6
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
10 additions
and
42 deletions
+10
-42
ConventionsPlugin.java
...ava/org/springframework/boot/build/ConventionsPlugin.java
+1
-10
get-jdk-url.sh
ci/images/get-jdk-url.sh
+1
-1
setup.sh
ci/images/setup.sh
+0
-10
Dockerfile
ci/images/spring-boot-ci-image/Dockerfile
+1
-1
Dockerfile
ci/images/spring-boot-jdk11-ci-image/Dockerfile
+1
-1
Dockerfile
ci/images/spring-boot-jdk13-ci-image/Dockerfile
+1
-1
Dockerfile
ci/images/spring-boot-jdk14-ci-image/Dockerfile
+1
-1
pipeline.yml
ci/pipeline.yml
+1
-1
build-project.sh
ci/scripts/build-project.sh
+1
-10
detect-jdk-updates.sh
ci/scripts/detect-jdk-updates.sh
+2
-2
get-secondary-java-version.sh
ci/scripts/get-secondary-java-version.sh
+0
-4
No files found.
buildSrc/src/main/java/org/springframework/boot/build/ConventionsPlugin.java
View file @
8d3ab1cc
...
...
@@ -141,7 +141,6 @@ public class ConventionsPlugin implements Plugin<Project> {
});
project
.
getTasks
().
withType
(
Test
.
class
,
(
test
)
->
{
withOptionalBuildJavaHome
(
project
,
(
javaHome
)
->
test
.
setExecutable
(
javaHome
+
"/bin/java"
));
withOptionalTestJavaHome
(
project
,
(
javaHome
)
->
test
.
setExecutable
(
javaHome
+
"/bin/java"
));
test
.
useJUnitPlatform
();
test
.
setMaxHeapSize
(
"1024M"
);
});
...
...
@@ -200,15 +199,7 @@ public class ConventionsPlugin implements Plugin<Project> {
}
private
void
withOptionalBuildJavaHome
(
Project
project
,
Consumer
<
String
>
consumer
)
{
withOptionalJavaHome
(
project
,
consumer
,
"buildJavaHome"
);
}
private
void
withOptionalTestJavaHome
(
Project
project
,
Consumer
<
String
>
consumer
)
{
withOptionalJavaHome
(
project
,
consumer
,
"testJavaHome"
);
}
private
void
withOptionalJavaHome
(
Project
project
,
Consumer
<
String
>
consumer
,
String
javaHome
)
{
String
buildJavaHome
=
(
String
)
project
.
findProperty
(
javaHome
);
String
buildJavaHome
=
(
String
)
project
.
findProperty
(
"buildJavaHome"
);
if
(
buildJavaHome
!=
null
&&
!
buildJavaHome
.
isEmpty
())
{
consumer
.
accept
(
buildJavaHome
);
}
...
...
ci/images/get-jdk-url.sh
View file @
8d3ab1cc
...
...
@@ -12,7 +12,7 @@ case "$1" in
echo
"https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jdk_x64_linux_hotspot_13.0.2_8.tar.gz"
;;
java14
)
echo
"https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk
14-2020-03-05-04-06/OpenJDK14-jdk_x64_linux_hotspot_2020-03-05-04-0
6.tar.gz"
echo
"https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk
-14%2B36/OpenJDK14U-jdk_x64_linux_hotspot_14_3
6.tar.gz"
;;
*
)
echo
$"Unknown java version"
...
...
ci/images/setup.sh
View file @
8d3ab1cc
...
...
@@ -23,16 +23,6 @@ curl -L ${JDK_URL} | tar zx --strip-components=1
test
-f
/opt/openjdk/bin/java
test
-f
/opt/openjdk/bin/javac
if
[[
$1
!=
$2
]]
;
then
SECONDARY_JDK_URL
=
$(
./get-jdk-url.sh
$2
)
mkdir
-p
/opt/openjdk-secondary
cd
/opt/openjdk-secondary
curl
-L
${
SECONDARY_JDK_URL
}
|
tar
zx
--strip-components
=
1
test
-f
/opt/openjdk-secondary/bin/java
test
-f
/opt/openjdk-secondary/bin/javac
fi
###########################################################
# DOCKER
...
...
ci/images/spring-boot-ci-image/Dockerfile
View file @
8d3ab1cc
...
...
@@ -2,7 +2,7 @@ FROM ubuntu:bionic-20200219
ADD
setup.sh /setup.sh
ADD
get-jdk-url.sh /get-jdk-url.sh
RUN
./setup.sh java8
java8
RUN
./setup.sh java8
ENV
JAVA_HOME /opt/openjdk
ENV
PATH $JAVA_HOME/bin:$PATH
...
...
ci/images/spring-boot-jdk11-ci-image/Dockerfile
View file @
8d3ab1cc
...
...
@@ -2,7 +2,7 @@ FROM ubuntu:bionic-20200219
ADD
setup.sh /setup.sh
ADD
get-jdk-url.sh /get-jdk-url.sh
RUN
./setup.sh java11
java11
RUN
./setup.sh java11
ENV
JAVA_HOME /opt/openjdk
ENV
PATH $JAVA_HOME/bin:$PATH
...
...
ci/images/spring-boot-jdk13-ci-image/Dockerfile
View file @
8d3ab1cc
...
...
@@ -2,7 +2,7 @@ FROM ubuntu:bionic-20200219
ADD
setup.sh /setup.sh
ADD
get-jdk-url.sh /get-jdk-url.sh
RUN
./setup.sh java13
java13
RUN
./setup.sh java13
ENV
JAVA_HOME /opt/openjdk
ENV
PATH $JAVA_HOME/bin:$PATH
...
...
ci/images/spring-boot-jdk14-ci-image/Dockerfile
View file @
8d3ab1cc
...
...
@@ -2,7 +2,7 @@ FROM ubuntu:bionic-20200219
ADD
setup.sh /setup.sh
ADD
get-jdk-url.sh /get-jdk-url.sh
RUN
./setup.sh java
8 java
14
RUN
./setup.sh java14
ENV
JAVA_HOME /opt/openjdk
ENV
PATH $JAVA_HOME/bin:$PATH
...
...
ci/pipeline.yml
View file @
8d3ab1cc
...
...
@@ -410,7 +410,7 @@ jobs:
plan
:
-
get
:
spring-boot-jdk14-ci-image
-
get
:
git-repo
trigger
:
fals
e
trigger
:
tru
e
-
put
:
repo-status-jdk14-build
params
:
{
state
:
"
pending"
,
commit
:
"
git-repo"
}
-
do
:
...
...
ci/scripts/build-project.sh
View file @
8d3ab1cc
...
...
@@ -5,14 +5,5 @@ source $(dirname $0)/common.sh
repository
=
$(
pwd
)
/distribution-repository
pushd
git-repo
>
/dev/null
if
[[
-d
/opt/openjdk-secondary
]]
;
then
java_version
=
$(
./
$(
dirname
$0
)
/get-secondary-java-version.sh
)
if
[[
${
java_version
}
=
"14"
]]
;
then
./gradlew
-Dorg
.gradle.internal.launcher.welcomeMessageEnabled
=
false
--no-daemon
--max-workers
=
4
-PtestJavaHome
=
/opt/openjdk-secondary
-PdeploymentRepository
=
${
repository
}
build publishAllPublicationsToDeploymentRepository
-x
:spring-boot-project:spring-boot-tools:spring-boot-gradle-plugin:test
else
./gradlew
-Dorg
.gradle.internal.launcher.welcomeMessageEnabled
=
false
--no-daemon
--max-workers
=
4
-PtestJavaHome
=
/opt/openjdk-secondary
-PdeploymentRepository
=
${
repository
}
build publishAllPublicationsToDeploymentRepository
fi
else
./gradlew
-Dorg
.gradle.internal.launcher.welcomeMessageEnabled
=
false
--no-daemon
--max-workers
=
4
-PdeploymentRepository
=
${
repository
}
build publishAllPublicationsToDeploymentRepository
fi
./gradlew
-Dorg
.gradle.internal.launcher.welcomeMessageEnabled
=
false
--no-daemon
--max-workers
=
4
-PdeploymentRepository
=
${
repository
}
build publishAllPublicationsToDeploymentRepository
popd
>
/dev/null
ci/scripts/detect-jdk-updates.sh
View file @
8d3ab1cc
...
...
@@ -14,7 +14,7 @@ case "$JDK_VERSION" in
ISSUE_TITLE
=
"Upgrade Java 13 version in CI image"
;;
java14
)
BASE_URL
=
"https://api.adoptopenjdk.net/v3/assets/feature_releases/14
/ea
"
BASE_URL
=
"https://api.adoptopenjdk.net/v3/assets/feature_releases/14"
ISSUE_TITLE
=
"Upgrade Java 14 version in CI image"
;;
*
)
...
...
@@ -22,7 +22,7 @@ case "$JDK_VERSION" in
exit
1
;
esac
response
=
$(
curl
-s
${
BASE_URL
}
\?
architecture
\=
x64
\&
heap_size
\=
normal
\&
image_type
\=
jdk
\&
jvm_impl
\=
hotspot
\&
os
\=
linux
\&
sort_order
\=
DESC
\&
vendor
\=
adoptopenjdk
)
response
=
$(
curl
-s
${
BASE_URL
}
\
/
ga
\
?
architecture
\=
x64
\&
heap_size
\=
normal
\&
image_type
\=
jdk
\&
jvm_impl
\=
hotspot
\&
os
\=
linux
\&
sort_order
\=
DESC
\&
vendor
\=
adoptopenjdk
)
latest
=
$(
jq
-r
'.[0].binaries[0].package.link'
<<<
"
$response
"
)
current
=
$(
git-repo/ci/images/get-jdk-url.sh
${
JDK_VERSION
}
)
...
...
ci/scripts/get-secondary-java-version.sh
deleted
100755 → 0
View file @
f0e57ed6
#!/bin/bash
set
-e
/opt/openjdk-secondary/bin/java
-XshowSettings
:properties
-version
2>&1 |
grep
"java.specification.version"
|
awk
'{split($0,parts,"="); print parts[2]}'
|
awk
'{$1=$1;print}'
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment