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
ee41d71e
Commit
ee41d71e
authored
Aug 19, 2020
by
Scott Frederick
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.3.x'
Closes gh-23016
parents
c302b720
56bc0eb9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
10 deletions
+12
-10
Phase.java
.../springframework/boot/buildpack/platform/build/Phase.java
+2
-1
LifecycleTests.java
...amework/boot/buildpack/platform/build/LifecycleTests.java
+1
-1
PhaseTests.java
...ngframework/boot/buildpack/platform/build/PhaseTests.java
+7
-6
lifecycle-creator-clean-cache.json
...ildpack/platform/build/lifecycle-creator-clean-cache.json
+1
-1
lifecycle-creator.json
...work/boot/buildpack/platform/build/lifecycle-creator.json
+1
-1
No files found.
spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/Phase.java
View file @
ee41d71e
...
@@ -30,6 +30,7 @@ import org.springframework.util.StringUtils;
...
@@ -30,6 +30,7 @@ import org.springframework.util.StringUtils;
* An individual build phase executed as part of a {@link Lifecycle} run.
* An individual build phase executed as part of a {@link Lifecycle} run.
*
*
* @author Phillip Webb
* @author Phillip Webb
* @author Scott Frederick
*/
*/
class
Phase
{
class
Phase
{
...
@@ -112,7 +113,7 @@ class Phase {
...
@@ -112,7 +113,7 @@ class Phase {
update
.
withUser
(
"root"
);
update
.
withUser
(
"root"
);
update
.
withBind
(
DOMAIN_SOCKET_PATH
,
DOMAIN_SOCKET_PATH
);
update
.
withBind
(
DOMAIN_SOCKET_PATH
,
DOMAIN_SOCKET_PATH
);
}
}
update
.
withCommand
(
"/lifecycle/"
+
this
.
name
,
StringUtils
.
toStringArray
(
this
.
args
));
update
.
withCommand
(
"/
cnb/
lifecycle/"
+
this
.
name
,
StringUtils
.
toStringArray
(
this
.
args
));
update
.
withLabel
(
"author"
,
"spring-boot"
);
update
.
withLabel
(
"author"
,
"spring-boot"
);
this
.
binds
.
forEach
(
update:
:
withBind
);
this
.
binds
.
forEach
(
update:
:
withBind
);
}
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/LifecycleTests.java
View file @
ee41d71e
...
@@ -190,7 +190,7 @@ class LifecycleTests {
...
@@ -190,7 +190,7 @@ class LifecycleTests {
}
}
private
void
assertPhaseWasRun
(
String
name
,
IOConsumer
<
ContainerConfig
>
configConsumer
)
throws
IOException
{
private
void
assertPhaseWasRun
(
String
name
,
IOConsumer
<
ContainerConfig
>
configConsumer
)
throws
IOException
{
ContainerReference
containerReference
=
ContainerReference
.
of
(
"lifecycle-"
+
name
);
ContainerReference
containerReference
=
ContainerReference
.
of
(
"
cnb-
lifecycle-"
+
name
);
verify
(
this
.
docker
.
container
()).
start
(
containerReference
);
verify
(
this
.
docker
.
container
()).
start
(
containerReference
);
verify
(
this
.
docker
.
container
()).
logs
(
eq
(
containerReference
),
any
());
verify
(
this
.
docker
.
container
()).
logs
(
eq
(
containerReference
),
any
());
verify
(
this
.
docker
.
container
()).
remove
(
containerReference
,
true
);
verify
(
this
.
docker
.
container
()).
remove
(
containerReference
,
true
);
...
...
spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/PhaseTests.java
View file @
ee41d71e
...
@@ -30,6 +30,7 @@ import static org.mockito.Mockito.verifyNoMoreInteractions;
...
@@ -30,6 +30,7 @@ import static org.mockito.Mockito.verifyNoMoreInteractions;
* Tests for {@link Phase}.
* Tests for {@link Phase}.
*
*
* @author Phillip Webb
* @author Phillip Webb
* @author Scott Frederick
*/
*/
class
PhaseTests
{
class
PhaseTests
{
...
@@ -52,7 +53,7 @@ class PhaseTests {
...
@@ -52,7 +53,7 @@ class PhaseTests {
Phase
phase
=
new
Phase
(
"test"
,
false
);
Phase
phase
=
new
Phase
(
"test"
,
false
);
Update
update
=
mock
(
Update
.
class
);
Update
update
=
mock
(
Update
.
class
);
phase
.
apply
(
update
);
phase
.
apply
(
update
);
verify
(
update
).
withCommand
(
"/lifecycle/test"
,
NO_ARGS
);
verify
(
update
).
withCommand
(
"/
cnb/
lifecycle/test"
,
NO_ARGS
);
verify
(
update
).
withLabel
(
"author"
,
"spring-boot"
);
verify
(
update
).
withLabel
(
"author"
,
"spring-boot"
);
verifyNoMoreInteractions
(
update
);
verifyNoMoreInteractions
(
update
);
}
}
...
@@ -65,7 +66,7 @@ class PhaseTests {
...
@@ -65,7 +66,7 @@ class PhaseTests {
phase
.
apply
(
update
);
phase
.
apply
(
update
);
verify
(
update
).
withUser
(
"root"
);
verify
(
update
).
withUser
(
"root"
);
verify
(
update
).
withBind
(
"/var/run/docker.sock"
,
"/var/run/docker.sock"
);
verify
(
update
).
withBind
(
"/var/run/docker.sock"
,
"/var/run/docker.sock"
);
verify
(
update
).
withCommand
(
"/lifecycle/test"
,
NO_ARGS
);
verify
(
update
).
withCommand
(
"/
cnb/
lifecycle/test"
,
NO_ARGS
);
verify
(
update
).
withLabel
(
"author"
,
"spring-boot"
);
verify
(
update
).
withLabel
(
"author"
,
"spring-boot"
);
verifyNoMoreInteractions
(
update
);
verifyNoMoreInteractions
(
update
);
}
}
...
@@ -76,7 +77,7 @@ class PhaseTests {
...
@@ -76,7 +77,7 @@ class PhaseTests {
phase
.
withLogLevelArg
();
phase
.
withLogLevelArg
();
Update
update
=
mock
(
Update
.
class
);
Update
update
=
mock
(
Update
.
class
);
phase
.
apply
(
update
);
phase
.
apply
(
update
);
verify
(
update
).
withCommand
(
"/lifecycle/test"
,
"-log-level"
,
"debug"
);
verify
(
update
).
withCommand
(
"/
cnb/
lifecycle/test"
,
"-log-level"
,
"debug"
);
verify
(
update
).
withLabel
(
"author"
,
"spring-boot"
);
verify
(
update
).
withLabel
(
"author"
,
"spring-boot"
);
verifyNoMoreInteractions
(
update
);
verifyNoMoreInteractions
(
update
);
}
}
...
@@ -87,7 +88,7 @@ class PhaseTests {
...
@@ -87,7 +88,7 @@ class PhaseTests {
phase
.
withLogLevelArg
();
phase
.
withLogLevelArg
();
Update
update
=
mock
(
Update
.
class
);
Update
update
=
mock
(
Update
.
class
);
phase
.
apply
(
update
);
phase
.
apply
(
update
);
verify
(
update
).
withCommand
(
"/lifecycle/test"
);
verify
(
update
).
withCommand
(
"/
cnb/
lifecycle/test"
);
verify
(
update
).
withLabel
(
"author"
,
"spring-boot"
);
verify
(
update
).
withLabel
(
"author"
,
"spring-boot"
);
verifyNoMoreInteractions
(
update
);
verifyNoMoreInteractions
(
update
);
}
}
...
@@ -98,7 +99,7 @@ class PhaseTests {
...
@@ -98,7 +99,7 @@ class PhaseTests {
phase
.
withArgs
(
"a"
,
"b"
,
"c"
);
phase
.
withArgs
(
"a"
,
"b"
,
"c"
);
Update
update
=
mock
(
Update
.
class
);
Update
update
=
mock
(
Update
.
class
);
phase
.
apply
(
update
);
phase
.
apply
(
update
);
verify
(
update
).
withCommand
(
"/lifecycle/test"
,
"a"
,
"b"
,
"c"
);
verify
(
update
).
withCommand
(
"/
cnb/
lifecycle/test"
,
"a"
,
"b"
,
"c"
);
verify
(
update
).
withLabel
(
"author"
,
"spring-boot"
);
verify
(
update
).
withLabel
(
"author"
,
"spring-boot"
);
verifyNoMoreInteractions
(
update
);
verifyNoMoreInteractions
(
update
);
}
}
...
@@ -110,7 +111,7 @@ class PhaseTests {
...
@@ -110,7 +111,7 @@ class PhaseTests {
phase
.
withBinds
(
volumeName
,
"/test"
);
phase
.
withBinds
(
volumeName
,
"/test"
);
Update
update
=
mock
(
Update
.
class
);
Update
update
=
mock
(
Update
.
class
);
phase
.
apply
(
update
);
phase
.
apply
(
update
);
verify
(
update
).
withCommand
(
"/lifecycle/test"
);
verify
(
update
).
withCommand
(
"/
cnb/
lifecycle/test"
);
verify
(
update
).
withLabel
(
"author"
,
"spring-boot"
);
verify
(
update
).
withLabel
(
"author"
,
"spring-boot"
);
verify
(
update
).
withBind
(
volumeName
,
"/test"
);
verify
(
update
).
withBind
(
volumeName
,
"/test"
);
verifyNoMoreInteractions
(
update
);
verifyNoMoreInteractions
(
update
);
...
...
spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator-clean-cache.json
View file @
ee41d71e
{
{
"User"
:
"root"
,
"User"
:
"root"
,
"Image"
:
"pack.local/ephemeral-builder"
,
"Image"
:
"pack.local/ephemeral-builder"
,
"Cmd"
:
[
"/lifecycle/creator"
,
"-app"
,
"/workspace"
,
"-platform"
,
"/platform"
,
"-run-image"
,
"docker.io/cloudfoundry/run:latest"
,
"-layers"
,
"/layers"
,
"-cache-dir"
,
"/cache"
,
"-launch-cache"
,
"/launch-cache"
,
"-daemon"
,
"-skip-restore"
,
"docker.io/library/my-application:latest"
],
"Cmd"
:
[
"/
cnb/
lifecycle/creator"
,
"-app"
,
"/workspace"
,
"-platform"
,
"/platform"
,
"-run-image"
,
"docker.io/cloudfoundry/run:latest"
,
"-layers"
,
"/layers"
,
"-cache-dir"
,
"/cache"
,
"-launch-cache"
,
"/launch-cache"
,
"-daemon"
,
"-skip-restore"
,
"docker.io/library/my-application:latest"
],
"Labels"
:
{
"Labels"
:
{
"author"
:
"spring-boot"
"author"
:
"spring-boot"
},
},
...
...
spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator.json
View file @
ee41d71e
{
{
"User"
:
"root"
,
"User"
:
"root"
,
"Image"
:
"pack.local/ephemeral-builder"
,
"Image"
:
"pack.local/ephemeral-builder"
,
"Cmd"
:
[
"/lifecycle/creator"
,
"-app"
,
"/workspace"
,
"-platform"
,
"/platform"
,
"-run-image"
,
"docker.io/cloudfoundry/run:latest"
,
"-layers"
,
"/layers"
,
"-cache-dir"
,
"/cache"
,
"-launch-cache"
,
"/launch-cache"
,
"-daemon"
,
"docker.io/library/my-application:latest"
],
"Cmd"
:
[
"/
cnb/
lifecycle/creator"
,
"-app"
,
"/workspace"
,
"-platform"
,
"/platform"
,
"-run-image"
,
"docker.io/cloudfoundry/run:latest"
,
"-layers"
,
"/layers"
,
"-cache-dir"
,
"/cache"
,
"-launch-cache"
,
"/launch-cache"
,
"-daemon"
,
"docker.io/library/my-application:latest"
],
"Labels"
:
{
"Labels"
:
{
"author"
:
"spring-boot"
"author"
:
"spring-boot"
},
},
...
...
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