Commit Graph

390 Commits

Author SHA1 Message Date
Phillip Webb
b1547d0139 Merge branch '3.1.x'
Closes gh-37171
2023-08-31 22:38:29 -07:00
Phillip Webb
37e67058b7 Merge branch '3.0.x' into 3.1.x
Closes gh-37169
2023-08-31 22:24:14 -07:00
Phillip Webb
71ed31343c Merge branch '2.7.x' into 3.0.x
Closes gh-37168
2023-08-31 22:01:06 -07:00
Phillip Webb
fd8cb74b46 Load algorithm parameters from PEM encoded 'EC PRIVATE KEY' files
Update `PrivateKeyParser` implementations so that algorithm parameters
for PEM encoded 'EC PRIVATE KEY' files are loaded from the incoming
data.

Prior to this commit, the algorithm parameter was hard-coded to
'secp384r1' which could result in a mismatch to the actual file
content.

Fixes gh-34232
2023-08-31 21:40:11 -07:00
Phillip Webb
3640491d5a Fix Timezone used for now in BuildRequestTests 2023-08-30 20:34:01 -07:00
Phillip Webb
c142051320 Merge branch '3.1.x' 2023-08-30 20:33:32 -07:00
Phillip Webb
f8f4a2b986 Fix Timezone used for now in BuildRequestTests 2023-08-30 20:33:17 -07:00
Scott Frederick
c17ecf0f0b Add support for caching to bind mounts when building images
When building an image using the Maven `spring-boot:build-image` goal or
the Gradle `bootBuildImage` task, the build and launch caches can be
configured to use a bind mount as an alternative to using a named
volume.

Closes gh-28387
2023-08-21 15:04:39 -05:00
Scott Frederick
eb45aab712 Upgrade default CNB builders to Paketo Jammy
Closes gh-36689
2023-08-14 13:29:42 -05:00
Phillip Webb
d73d8f8e4f Merge branch '3.1.x' 2023-08-13 19:15:56 -07:00
Phillip Webb
848a61a3a8 Merge branch '3.0.x' into 3.1.x 2023-08-13 18:50:33 -07:00
Phillip Webb
a0089c5c76 Merge branch '2.7.x' into 3.0.x 2023-08-13 18:44:36 -07:00
Phillip Webb
46773dd5df Update copyright year of changed files 2023-08-13 18:19:05 -07:00
Moritz Halbritter
7bb337aeb1 Polish tests 2023-08-08 13:12:47 +02:00
Andy Wilkinson
b1d26fe961 Revert "Upgrade default CNB builders to Paketo Jammy"
This reverts commit 6506208d29. The
upgrade to the Jammy builder was causing
failsWhenBuildImageIsInvokedOnMultiModuleProjectWithBuildImageGoal to
hang on CI.

See gh-36689
2023-08-07 12:10:27 +01:00
Scott Frederick
ecdb9f6b07 Add support for CNB platform API 0.12
Closes gh-36712
2023-08-03 15:57:36 -05:00
Scott Frederick
6506208d29 Upgrade default CNB builders to Paketo Jammy
Closes gh-36689
2023-08-02 19:06:16 -05:00
Andy Wilkinson
b02c1877fc Fix configIsReadWithProvidedContext on Windows
See gh-36445
2023-08-02 14:59:47 +01:00
Scott Frederick
4393a2244c Use Docker CLI context to determine daemon host address for image building
Configuration files managed by the Docker CLI are now used to determine
the host address of the Docker daemon used when building images using
buildpacks when a host address is not configured with environment
variables or build tool plugin configuration.

Closes gh-36445
2023-07-18 13:21:01 -06:00
Scott Frederick
c32877493c Merge branch '3.1.x'
Closes gh-36055
2023-06-23 15:47:00 -06:00
Scott Frederick
b9b314622f Merge branch '3.0.x' into 3.1.x
Closes gh-36054
2023-06-23 15:46:44 -06:00
Scott Frederick
4a3abdd7c3 Merge branch '2.7.x' into 3.0.x
Closes gh-36053
2023-06-23 15:46:27 -06:00
Johnny Lim
59d4bf97a1 Add Javadoc since to ImageReference.inTaglessForm()
See gh-36048
2023-06-23 15:45:29 -06:00
Scott Frederick
90dd7449bb Merge branch '3.1.x'
Closes gh-36051
2023-06-23 15:20:25 -06:00
Scott Frederick
92b2573a60 Merge branch '3.0.x' into 3.1.x
Closes gh-36050
2023-06-23 15:20:06 -06:00
Scott Frederick
eeeb2ad72a Merge branch '2.7.x' into 3.0.x
Closes gh-36049
2023-06-23 15:19:44 -06:00
Johnny Lim
4a2c9d99dc Remove redundant Files.delete() calls in tests
See gh-35986
2023-06-23 15:14:59 -06:00
Andy Wilkinson
ca5bd37e81 Upgrade to Spring Framework 6.1.0-M1
Closes gh-35977
Closes gh-35980
2023-06-19 18:12:16 +01:00
Phillip Webb
e3ed87d165 Merge branch '3.0.x' 2023-05-12 13:21:52 -07:00
Phillip Webb
92e420a098 Merge branch '2.7.x' into 3.0.x 2023-05-12 13:14:12 -07:00
Phillip Webb
57e45dfb21 Update copyright year of changed files 2023-05-12 13:01:43 -07:00
Phillip Webb
ef4b09718c Fix loading of PKCS#8 PEM encoded EC and DSA keys for buildpack
Polish and port support for PKCS#8 PEM encoded EC and DSA keys to
the buildpack code.

See gh-35322
2023-05-12 13:01:30 -07:00
Phillip Webb
e9c4a5d663 Polish 2023-05-12 13:01:30 -07:00
Moritz Halbritter
e930801eb1 Separate tag in the Docker API tag call
Closes gh-35358
2023-05-11 09:52:52 +02:00
Moritz Halbritter
d00e070cdb Separate tag in the Docker API tag call
Closes gh-35358
2023-05-11 09:52:45 +02:00
Moritz Halbritter
4eef8d5a53 Separate tag in the Docker API tag call
Closes gh-35358
2023-05-11 09:52:41 +02:00
Moritz Halbritter
441ed30ee4 Polish "Replace Mockito argument captors with assertArg"
Co-authored-by: Andy Wilkinson <wilkinsona@vmware.com>

See gh-35015
2023-05-05 15:41:31 +02:00
Marc Leroux
b61834c92d Replace Mockito argument captors with assertArg
See gh-35015
2023-05-05 11:34:55 +02:00
Andy Wilkinson
b8ec7d291d Upgrade to Jackson Bom 2.15.0-rc2
Closes gh-34980
2023-04-14 11:55:20 +01:00
Phillip Webb
e9a198a68f Merge branch '3.0.x' 2023-04-12 22:16:35 -07:00
Scott Frederick
56bc6d2fa0 Allow image application directory to be configurable
An `applicationDirectory` option on the Maven
`spring-boot:build-image` goal and the Gradle `bootBuildImage` task
can be configured to set the location that will be used to upload
application contents to the builder image, and will contain the
application contents in the generated image.

Closes gh-34786
2023-04-07 14:00:00 -05:00
Scott Frederick
5817c8441d Allow image Created date to be configurable
A `createdDate` option on the Maven `spring-boot:build-image` goal
and the Gradle `bootBuildImage` task can be used to set the `Created`
metadata field on a generated OCI image to a specified date or to
the current date.

Closes gh-28798
2023-04-06 15:08:34 -05:00
Andy Wilkinson
bfeeda6fbc Merge branch '3.0.x'
Closes gh-34601
2023-03-14 14:40:50 +00:00
Andy Wilkinson
220c4b671b Merge branch '2.7.x' into 3.0.x
Closes gh-34600
2023-03-14 14:40:26 +00:00
Johnny Lim
00f388fa6f Polish Javadoc since tags for gh-34324
See gh-34587
2023-03-14 14:39:10 +00:00
Scott Frederick
dab8b07302 Merge branch '3.0.x'
Closes gh-34496
2023-03-06 15:31:09 -06:00
Scott Frederick
29ad690d56 Merge branch '2.7.x' into 3.0.x
Closes gh-34495
2023-03-06 15:30:55 -06:00
Scott Frederick
7730eee439 Use image manifest when exporting layers
A tar archive of a Docker image contains a `mainfest.json` file that
lists the path to each embedded tar file containing the contents of a
layer in the image. This manifest file should be used to identify the
layer files instead of relying on file naming conventions and
assumptions on the directory structure that are not consistent
between container engine implementations.

Fixes gh-34324
2023-03-06 15:13:08 -06:00
Chintan Radia
a98760125c Add support for CNB platform API 0.11
See gh-34383
2023-03-01 09:24:42 +01:00
Phillip Webb
157091a811 Merge branch '3.0.x' 2023-02-22 18:36:57 -08:00
Phillip Webb
0b15962aca Merge branch '2.7.x' into 3.0.x 2023-02-22 18:36:16 -08:00
Phillip Webb
b07269a018 Merge branch '3.0.x' 2023-02-21 23:20:07 -08:00
Phillip Webb
c4de86c244 Merge branch '2.7.x' into 3.0.x 2023-02-21 23:17:57 -08:00
Phillip Webb
df5898a146 Reformat code following spring-javaformat upgrade 2023-02-21 22:53:27 -08:00
Andy Wilkinson
f595b46bd3 Upgrade to HttpClient5 5.2.1
Closes gh-34086
2023-02-06 14:46:05 +00:00
Moritz Halbritter
23f1c896c9 Merge branch '3.0.x'
Closes gh-34015
2023-01-31 10:20:36 +01:00
Johnny Lim
bc7fc90550 Replace Base64Utils with JDK's Base64
See gh-33967
2023-01-31 10:20:06 +01:00
Phillip Webb
390892f11b Merge branch '3.0.x'
Closes gh-33998
2023-01-26 21:45:57 -08:00
Krzysztof Krason
d3efd7e091 Use try with close
See gh-33987
2023-01-26 20:36:38 -08:00
Krzysztof Krason
a9c547e767 Use text blocks
See gh-33987
2023-01-26 20:36:01 -08:00
Krzysztof Krason
6e46423983 Use diamond operators
See gh-33987
2023-01-26 20:35:08 -08:00
Scott Frederick
1588f9d881 Migrate buildpack-platform to Apache HttpClient 5
Closes gh-33533
2023-01-23 13:59:08 -06:00
Phillip Webb
a2ac38e203 Update copyright year of changed files 2023-01-09 15:46:07 -08:00
Krzysztof Krason
cf6493f65c Simplify AssertJ assertions and also make them more readable
See gh-33653
2023-01-09 11:10:20 +01:00
Phillip Webb
f588793445 Update copyright year of changed files 2022-12-22 01:00:42 -08:00
Moritz Halbritter
f36e2ecb7b Use AutoClosables with try-with-resources
Closes gh-33538
2022-12-16 15:43:15 +01:00
Moritz Halbritter
725337f976 Make fields final
Closes gh-33537
2022-12-16 14:28:44 +01:00
Scott Frederick
bb684cc0ad Add support for CNB platform API 0.10
Fixes gh-32949
2022-11-03 11:29:02 -05:00
Phillip Webb
7e8ed075c0 Merge branch '2.7.x'
Closes gh-32682
2022-10-11 23:21:52 -07:00
Phillip Webb
ed01a77a99 Merge branch '2.6.x' into 2.7.x
Closes gh-32681
2022-10-11 23:19:34 -07:00
Phillip Webb
e0c79ce598 Support PEM formatted elliptic-curve TLS keys
Update `PrivateKeyParser` to support loading PEM formatted
elliptic-curve keys. We need to do a similar trick to the PKCS1 keys
and convert them to a `PKCS8EncodedKeySpec`.

Fixes gh-32646
2022-10-11 23:18:44 -07:00
Phillip Webb
e0b67889a8 Use Stream.toList instead of Stream.collect when possible
Update code to make use of `Stream.toList()` whenever possible.

Closes gh-28177
2022-10-04 00:29:22 -07:00
dreis2211
65ef8fc51a Use ByteArrayOutputStream.toString where possible
See gh-32534
2022-09-29 15:03:24 +02:00
Phillip Webb
46be4a3f30 Merge branch '2.7.x' 2022-09-08 19:38:18 -07:00
Phillip Webb
e88a682220 Merge branch '2.6.x' into 2.7.x 2022-09-08 19:37:52 -07:00
Scott Frederick
c0cbaa1460 Merge branch '2.7.x' 2022-08-24 13:18:22 -05:00
Scott Frederick
257e236b06 Fix image-building unit tests on Windows
See gh-32000
2022-08-24 13:14:39 -05:00
Scott Frederick
2cdaab59f6 Merge branch '2.7.x'
Closes gh-32122
2022-08-19 13:57:26 -05:00
Scott Frederick
c16094e04b Disable SELinux label security policy when building images
When using the Gradle `bootBuildImage` task or Maven
`spring-boot:build-image` goal on a Linux distribution with SELinux
enabled, binding the Docker socket in the builder container might
fail. This commit disables the `label` security policy in the builder
container to prevent this type of failure.

Fixes gh-32000
2022-08-19 13:56:34 -05:00
Phillip Webb
22144987e9 Update copyright year of changed files 2022-07-29 12:10:03 +01:00
Phillip Webb
7377d85096 Merge branch '2.7.x'
Closes gh-31866
2022-07-26 12:18:14 +01:00
Phillip Webb
a4ef6a7c5c Merge branch '2.6.x' into 2.7.x
Closes gh-31865
2022-07-26 12:13:16 +01:00
Phillip Webb
f8412847dc Update copyright year for "Fix typos in code and documentation"
See gh-31734
2022-07-26 12:08:30 +01:00
Marc Wrobel
dbfc6bded4 Fix typos in code and documentation
See gh-31734
2022-07-26 12:08:07 +01:00
Phillip Webb
b93dbd56e8 Merge branch '2.7.x' 2022-07-26 10:51:17 +01:00
Phillip Webb
3931e82841 Merge branch '2.6.x' into 2.7.x 2022-07-26 10:50:42 +01:00
Phillip Webb
4bcec6e0ee Polish 2022-07-26 10:50:01 +01:00
Scott Frederick
cf7a163c6d Merge branch '2.7.x' 2022-07-20 16:07:32 -05:00
Scott Frederick
f9cf31e59e Fix compile errors
See gh-28844
2022-07-20 16:07:19 -05:00
Scott Frederick
36d6106bb0 Merge branch '2.7.x'
Closes gh-31825
2022-07-20 15:11:30 -05:00
Scott Frederick
09c7ce6dab Merge branch '2.6.x' into 2.7.x
Closes gh-31824
2022-07-20 15:10:43 -05:00
Scott Frederick
9b0cdac58a Simplify support for pushing images to unauthenticated registries
This commit removes the requirement that `docker.publishRegistry`
configuration must be provided when an image is published by the Gradle
or Maven plugin.

Fixes gh-28844
2022-07-20 15:06:05 -05:00
Scott Frederick
e49597c1ae Merge branch '2.7.x'
Closes gh-31559
2022-06-30 14:58:48 -05:00
Scott Frederick
e24c49a09a Merge branch '2.6.x' into 2.7.x
Closes gh-31558
2022-06-30 14:58:28 -05:00
Scott Frederick
17bdc526f6 Avoid adding layers for buildpacks that exist in the builder
This commit adds validation of any buildpacks that are specified for
image building to match them against buildpacks that are bundled in
the builder. If an image buildpack's ID, version, and one layer
hash match the same information stored in a label on the builder
image, that buildpack won't be added and the buildpack bundled in
the builder will be used instead. This reduces the chance of adding to
the total count of layers in a builder image unnecessarily.

Fixes gh-31233
2022-06-30 14:35:34 -05:00
dreis2211
458f989cf3 Use switch expressions where appropriate
See gh-31527
2022-06-24 16:19:28 +01:00
Andy Wilkinson
631b1e0d76 Merge branch '2.7.x'
Closes gh-31526
2022-06-24 13:10:10 +01:00
Andy Wilkinson
1e08f545d0 Merge branch '2.6.x' into 2.7.x
Closes gh-31525
2022-06-24 13:05:06 +01:00
Andy Wilkinson
f49b16c645 Upgrade to Spring Java Format 0.0.34
Closes gh-31524
2022-06-24 12:57:52 +01:00
dreis2211
cc91009b70 Use java.util.HexFormat where appropriate
See gh-31477
2022-06-21 17:02:39 +01:00
dreis2211
5db04da275 Use pattern matching for instanceof where appropriate
See gh-31475
2022-06-20 17:55:36 +01:00
dreis2211
fb45fc4819 Use Files.writeString() and Files.readString() where possible
See gh-31459
2022-06-20 09:05:09 +02:00
Andy Wilkinson
935d1264e0 Merge branch '2.6.x' into 2.7.x 2022-05-26 18:13:08 +01:00
Andy Wilkinson
3d203d0215 Polish 2022-05-26 17:30:39 +01:00
Andy Wilkinson
455ee0ce22 Merge branch '2.6.x' into 2.7.x
Closes gh-31177
2022-05-26 15:53:38 +01:00
Andy Wilkinson
ee45fd2fc8 Remove redundant throws declarations from internal APIs
Closes gh-31176
2022-05-26 15:47:35 +01:00
Andy Wilkinson
4cd850cfc0 Merge branch '2.6.x' into 2.7.x
Closes gh-30851
2022-05-03 15:17:13 +01:00
Andy Wilkinson
fa327a783d Merge branch '2.5.x' into 2.6.x
Closes gh-30850
2022-05-03 15:14:00 +01:00
Andy Wilkinson
4fd2e0c916 Polish "Fix typos"
See gh-30773
2022-05-03 14:09:53 +01:00
Andy Wilkinson
f6d24dc1a8 Fix typos
See gh-30773
2022-05-03 14:09:37 +01:00
Phillip Webb
dd5696b59b Update copyright year of changed files 2022-04-20 15:26:30 -07:00
Scott Frederick
f032690d0a Add support for CNB platform API 0.9
Fixes gh-30566
2022-04-13 16:09:32 -05:00
Scott Frederick
de321b00b7 Support podman for building images
Closes gh-30196
2022-03-11 16:39:07 -06:00
Scott Frederick
7ad538cd84 Add option to use configured Docker host in builder
This commit adds support for a `docker.bindHostToBuilder` option in
the Maven and Gradle image building goal and task.

Fixes gh-29384
2022-03-11 15:27:22 -06:00
Phillip Webb
26512f8ac6 Merge branch '2.6.x' into 2.7.x 2022-02-16 20:24:59 -08:00
Phillip Webb
5b4ec32645 Merge branch '2.5.x' into 2.6.x 2022-02-16 18:56:12 -08:00
Phillip Webb
9ab1b669d0 Polish 2022-02-16 17:56:07 -08:00
Moritz Halbritter
94d095ce1a Merge branch '2.6.x' into 2.7.x
Closes gh-29692
2022-02-09 14:10:41 +01:00
Moritz Halbritter
079ea41d6d Merge branch '2.5.x' into 2.6.x
Closes gh-29691
2022-02-09 14:09:33 +01:00
Moritz Halbritter
262db65a38 Ignore invalid stream types when reading log update events
See gh-29675
2022-02-09 14:03:02 +01:00
Phillip Webb
ce08b519b1 Merge branch '2.6.x' into 2.7.x 2022-02-02 10:37:55 -08:00
Phillip Webb
50e0e28155 Merge branch '2.5.x' into 2.6.x 2022-02-02 10:37:32 -08:00
Phillip Webb
2b40ce09d8 Update copyright year of changed files 2022-02-02 10:35:40 -08:00
Stephane Nicoll
f812b33cbd Merge branch '2.6.x' into 2.7.x
Closes gh-29613
2022-02-01 11:07:31 +01:00
Stephane Nicoll
136b5959c3 Merge branch '2.5.x' into 2.6.x
Closes gh-29612
2022-02-01 10:59:08 +01:00
Stephane Nicoll
7f17f819a6 Polish "Enforce use of BDDMockito"
See gh-29178
2022-02-01 10:03:18 +01:00
Yanming Zhou
b49418aaaf Enforce use of BDDMockito
1. Replace Mockito.verify*() with BDDMockito.then()
2. Replace Mockito.doReturn() with BDDMockito.willReturn()
3. Adjust checkstyle rule

See gh-29178
2022-02-01 09:37:15 +01:00
Scott Frederick
698eb94913 Merge branch '2.6.x' into 2.7.x
Closes gh-29554
2022-01-24 16:20:33 -06:00
Scott Frederick
909ef6d635 Merge branch '2.5.x' into 2.6.x
Closes gh-29553
2022-01-24 16:19:43 -06:00
Scott Frederick
000cbfa2d9 Set file permissions on all created test files
Closes gh-29551
2022-01-24 16:19:20 -06:00
Scott Frederick
3cb30cb283 Merge branch '2.6.x' into 2.7.x
Closes gh-28923
2021-12-07 14:10:46 -06:00
Scott Frederick
3555837845 Merge branch '2.5.x' into 2.6.x
Closes gh-28922
2021-12-07 14:10:28 -06:00
Scott Frederick
b0b2cd79b4 Use latest buildpack image tag when no tag is provided
Fixes gh-28921
2021-12-07 14:10:10 -06:00
Scott Frederick
5f14cffea3 Add support for CNB platform API 0.5 through 0.8
Fixes gh-28850
2021-12-01 14:05:20 -06:00
Andy Wilkinson
2a342ef416 Merge branch '2.5.x'
Closes gh-28662
2021-11-12 23:40:35 +00:00
Andy Wilkinson
5e4a502b2d Merge branch '2.4.x' into 2.5.x
Closes gh-28661
2021-11-12 20:31:25 +00:00
Andy Wilkinson
2cec3971d7 Prohibit unwanted dependencies in all modules not just starters
Closes gh-28658
2021-11-12 20:04:35 +00:00
Stephane Nicoll
9241f228d5 Add .gitattributes
Closes gh-28474
2021-10-28 15:31:40 +02:00
Stephane Nicoll
66553ac8c7 Add .gitattributes
Closes gh-28473
2021-10-28 15:27:49 +02:00
Stephane Nicoll
1b3f52d609 Harmonize line endings
See gh-27615
2021-10-28 15:22:57 +02:00
Scott Frederick
871468931f Polish "Add option to customize cache volume names when building an image"
See gh-28292
2021-10-19 15:38:12 -05:00
Julian Liebig
dc36346285 Add option to customize cache volume names when building an image
This commit adds configuration to the Maven and Gradle plugins to
allow specifying the names of build and launch cache volumes provided
to the CNB builder.

See gh-28292
2021-10-19 15:38:12 -05:00
Andy Wilkinson
48b1175559 Merge branch '2.5.x'
Closes gh-28263
2021-10-08 12:39:45 +01:00
Andy Wilkinson
d47260637b Merge branch '2.4.x' into 2.5.x
Closes gh-28262
2021-10-08 12:39:17 +01:00
Andy Wilkinson
c5d45585d9 Remove unnecessary overrides of finalize
Closes gh-28209
2021-10-08 12:39:00 +01:00
Scott Frederick
64c49003aa Polish "Add option to create tags for a built image"
See gh-27613
2021-09-28 15:32:27 -05:00
Rafael Ceccone
66f44b0c7f Add option to create tags for a built image
This commit adds configuration to the Maven and Gradle plugins to
allow specifying multiple tag to be created that refer to the built
image.

See gh-27613
2021-09-28 15:32:27 -05:00
dreis2211
cf0fcafd13 Polish
See gh-27940
2021-09-21 08:08:29 +02:00
Scott Frederick
a6d03279ca Merge branch '2.5.x'
Closes gh-27994
2021-09-14 16:45:58 -05:00
Scott Frederick
a540da11ad Merge branch '2.4.x' into 2.5.x
Closes gh-27993
2021-09-14 16:45:34 -05:00