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
3892f440
Commit
3892f440
authored
Jun 11, 2020
by
Phillip Webb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.3.x'
Closes gh-21895
parents
866ebf7c
1e7da4d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
BuildRequest.java
...framework/boot/buildpack/platform/build/BuildRequest.java
+3
-2
BuildRequestTests.java
...work/boot/buildpack/platform/build/BuildRequestTests.java
+8
-0
No files found.
spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/BuildRequest.java
View file @
3892f440
...
...
@@ -84,8 +84,9 @@ public class BuildRequest {
*/
public
BuildRequest
withBuilder
(
ImageReference
builder
)
{
Assert
.
notNull
(
builder
,
"Builder must not be null"
);
return
new
BuildRequest
(
this
.
name
,
this
.
applicationContent
,
builder
.
inTaggedForm
(),
this
.
creator
,
this
.
env
,
this
.
cleanCache
,
this
.
verboseLogging
);
builder
=
(
builder
.
getDigest
()
!=
null
)
?
builder
:
builder
.
inTaggedForm
();
return
new
BuildRequest
(
this
.
name
,
this
.
applicationContent
,
builder
,
this
.
creator
,
this
.
env
,
this
.
cleanCache
,
this
.
verboseLogging
);
}
/**
...
...
spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/BuildRequestTests.java
View file @
3892f440
...
...
@@ -98,6 +98,14 @@ public class BuildRequestTests {
assertThat
(
request
.
getBuilder
().
toString
()).
isEqualTo
(
"docker.io/spring/builder:latest"
);
}
@Test
void
withBuilderWhenHasDigestUpdatesBuilder
()
throws
IOException
{
BuildRequest
request
=
BuildRequest
.
forJarFile
(
writeTestJarFile
(
"my-app-0.0.1.jar"
)).
withBuilder
(
ImageReference
.
of
(
"spring/builder:@sha256:6e9f67fa63b0323e9a1e587fd71c561ba48a034504fb804fd26fd8800039835d"
));
assertThat
(
request
.
getBuilder
().
toString
()).
isEqualTo
(
"docker.io/spring/builder:@sha256:6e9f67fa63b0323e9a1e587fd71c561ba48a034504fb804fd26fd8800039835d"
);
}
@Test
void
withCreatorUpdatesCreator
()
throws
IOException
{
BuildRequest
request
=
BuildRequest
.
forJarFile
(
writeTestJarFile
(
"my-app-0.0.1.jar"
));
...
...
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