601 Commits

Author SHA1 Message Date
Scott Frederick
54288678d1 Configure Docker host in build plugins
This commit adds the ability to configure the Maven and Gradle
plugins to use a remote Docker daemon using build file
configuration, as an alternative to setting environment variables
to specify remote host connection details.

Fixes gh-23400
2020-09-18 13:51:20 -05:00
Andy Wilkinson
d2fae6e19e Merge branch '2.3.x'
Closes gh-23407
2020-09-18 09:09:53 +01:00
Andy Wilkinson
3861ef13fb Merge branch '2.2.x' into 2.3.x
Closes gh-23406
2020-09-18 09:09:41 +01:00
Andy Wilkinson
5ec673ff2a Add anchors to section headers in Gradle plugin docs
Fixes gh-23402
2020-09-18 09:06:54 +01:00
Scott Frederick
86fa8144f5 Polish "Support authentication to private Docker registry"
See gh-22972
2020-09-16 16:04:21 -05:00
姜为
e8f555e13d Support authentication to private docker registry
This commit adds the ability to configure Docker image registry
authentication credentials in the Maven and Gradle plugins. The
authentication credentials are passed to the Docker daemon with
all daemon API calls, and the daemon forwards the credentials to the
image registry when necessary. This makes it possible to use
builder and run images stored in a private Docker registry.

See gh-22972
2020-09-16 16:03:40 -05:00
Stephane Nicoll
f03ed3b2a7 Publish single page doc to /htmlsingle consistently
Closes gh-21585
2020-09-11 16:05:57 +02:00
Andy Wilkinson
143d19754b Exclude starter jars when running and packaging with Gradle
This commit updates the Gradle Plugin to filter dependencies based on
the Spring-Boot-Jar-Type entry in their manifest. Jars with a
Spring-Boot-Jar-Type of dependencies-starter are excluded. Unlike the
Maven plugin, jars with a type of annotation-processor are not
excluded. It is not necessary with Gradle as use of the
annotationProcessor configuration for such dependencies already ensures
that they are not included.

See gh-22036
2020-09-10 14:43:41 +01:00
Stephane Nicoll
defa7c47cd Merge branch '2.3.x'
Closes gh-23201
2020-09-07 12:42:48 +02:00
Stephane Nicoll
648789ef84 Document that buildpacks use non-root users
Closes gh-21122
2020-09-07 12:41:51 +02:00
EruDev
ffc577b499 Simplify code
See gh-23111
2020-09-01 10:04:31 +02:00
Stephane Nicoll
cc5f2537b1 Merge branch '2.3.x'
Closes gh-23148
2020-08-31 16:16:16 +02:00
Stephane Nicoll
ee914624e6 Document buildpacks are configured with target Java version
Closes gh-21796
2020-08-31 16:15:30 +02:00
Andy Wilkinson
9dc5b88949 Polish "Mark bootArchives configuration as unresolvable"
See gh-22943
2020-08-28 10:05:45 +01:00
Martin Chalupa
796307a78c Mark bootArchives configuration as unresolvable
See gh-22943
2020-08-28 10:05:44 +01:00
Andy Wilkinson
b57b2f0b44 Test the Gradle Plugin against 6.5 and 6.6
Closes gh-23075
2020-08-25 12:01:25 +01:00
Stephane Nicoll
f8265e3e44 Merge branch '2.3.x'
Closes gh-22980
2020-08-17 14:20:50 +02:00
Jean-Baptiste Nizet
27528fdd07 Fix custom image name example and documentation
There is no `artifactId` property in a gradle Project, and the default
value uses the project name.

See gh-22918
2020-08-17 13:59:42 +02:00
Stephane Nicoll
b1e631e8a6 Remove trailing whitespaces 2020-08-17 13:59:08 +02:00
Scott Frederick
7c7079f91a Merge branch '2.3.x' 2020-08-12 17:44:52 -05:00
Scott Frederick
4c6a722f18 Fix test for Java version in image building docs
See gh-22916
2020-08-12 17:43:37 -05:00
Scott Frederick
092bbd198e Merge branch '2.3.x'
Closes gh-22923
2020-08-12 17:04:54 -05:00
Scott Frederick
005ed8b8db Use Java version wildcard in image building docs
Fixes gh-22916
2020-08-12 17:04:17 -05:00
Scott Frederick
6b15822cb1 Polish "Add pullPolicy option for image building"
See gh-22736
2020-08-12 15:16:38 -05:00
anshlykov
c7449b57ce Add pullPolicy option for image building
This commit adds a pullPolicy option to the configuration of the Maven
plugin spring-boot:build-image goal and the Gradle plugin bootBuildImage
task. The new option gives users control over pulling the builder image
and run image from a remote image registry to the local Docker daemon.

See gh-22736
2020-08-12 15:16:38 -05:00
Andy Wilkinson
fff9193860 Merge branch '2.3.x'
Closes gh-22917
2020-08-12 17:06:30 +01:00
Andy Wilkinson
f43a0b4891 Fix configuration of environment in Kotlin bootBuildImage examples
Fixes gh-22913
2020-08-12 17:06:16 +01:00
Andy Wilkinson
9a2d2effa5 Merge branch '2.3.x'
Closes gh-22907
2020-08-12 12:24:38 +01:00
Andy Wilkinson
1381929525 Upgrade to Gradle 6.6
Closes gh-22905
2020-08-12 12:24:08 +01:00
Andy Wilkinson
079b5d3f50 Polish Gradle plugin after layering being enabled by default
Closes gh-20983
2020-08-06 11:37:09 +01:00
Madhura Bhave
41f5ba9077 Switch layering on by default
Closes gh-20983
2020-08-03 17:04:20 -07:00
Andy Wilkinson
d2926e0222 Merge branch '2.3.x'
Closes gh-22678
2020-07-30 20:57:15 +01:00
Andy Wilkinson
00cd8945d5 Document how to use Gradle's native bom support
Closes gh-21570
2020-07-30 20:53:44 +01:00
Andy Wilkinson
19ad163486 Merge branch '2.3.x'
Closes gh-22411
2020-07-20 13:58:40 +01:00
Andy Wilkinson
accc1f1ca8 Merge branch '2.2.x' into 2.3.x
Closes gh-22410
2020-07-20 13:58:19 +01:00
Andy Wilkinson
21f733b89b Merge branch '2.1.x' into 2.2.x
Closes gh-22409
2020-07-20 13:49:53 +01:00
Andy Wilkinson
179d2c79d6 Avoid trivialising what the reader's learning about
Closes gh-22408
2020-07-20 13:45:41 +01:00
Scott Frederick
e6318f83b2 Merge branch '2.3.x'
Closes gh-22349
2020-07-15 15:17:16 -05:00
Scott Frederick
210282260e Fail on bootBuildImage with launch script
This commit adds a check to the support code for the Gradle plugin
bootBuildImage task to ensure that the jar file that will be passed
to a builder is readable and has a valid directory. This prevents a
situation where the jar file cannot be read because it is prepended
with a launch script, and the builder does not receive any files to
process.

Notes have also been added to the Gradle plugin documentation to warn
against using a bootJar launchScript configuration and bootBuildImage
together, as well as caveats about launchScript that match the Maven
plugin documentation.

Fixes gh-22223
2020-07-15 14:58:11 -05:00
Andy Wilkinson
2d91a096db Merge branch '2.3.x'
Closes gh-22293
2020-07-09 16:02:42 +01:00
Andy Wilkinson
794ded5286 Test the Gradle plugin against Gradle 6.5.1
Closes gh-22292
2020-07-09 16:01:52 +01:00
Andy Wilkinson
ecbc8ea2df Merge branch '2.3.x'
Closes gh-22202
2020-07-02 15:17:04 +01:00
Andy Wilkinson
79770b9615 Use source sets to determine configurations deprecated for resolution
Fixes gh-22200
2020-07-02 15:14:00 +01:00
Scott Frederick
73b737c7d8 Merge branch '2.3.x'
Closes gh-22017
2020-06-18 15:11:07 -05:00
Scott Frederick
28643e4d2d Validate image references before passing to CNB builder
Prior to this commit, an image name or run image name derived from
the project name or provided by the user would be passed to the CNB
builder without validation by the Maven plugin build-image goal or
Gradle plugin bootBuildImage task. This could lead to error messages
from the plugins that are difficult to understand and diagnose.

This commit makes parsing of the image names more strict, based on
the grammar implemented by the Docker go library. This provides
validation of the image names before passing them to the builder,
with a more descriptive error message when parsing and validation
fails.

Fixes gh-21495
2020-06-18 15:09:57 -05:00
Andy Wilkinson
056d5f3120 Enable deprecation compilation warnings
See gh-21271
2020-06-16 12:50:47 +01:00
Andy Wilkinson
07fb4b065d Merge branch '2.3.x'
Closes gh-21940
2020-06-16 10:10:38 +01:00
Andy Wilkinson
0de466e06e Require dependency on s-b-dependencies to use its constraints
Previously, Spring Boot's modules published Gradle Module Metadata
(GMM) the declared a platform dependency on spring-boot-dependencies.
This provided versions for each module's own dependencies but also had
they unwanted side-effect of pulling in spring-boot-dependencies
constraints which would influence the version of other dependencies
declared in the same configuration. This was undesirable as users
should be able to opt in to this level of dependency management, either
by using the dependency management plugin or by using Gradle's built-in
support via a platform dependency on spring-boot-dependencies.

This commit reworks how Spring Boot's build uses
spring-boot-dependencies and spring-boot-parent to provide its own
dependency management. Configurations that aren't seen by consumers are
configured to extend a dependencyManagement configuration that has an
enforced platform dependency on spring-boot-parent. This enforces
spring-boot-parent's version constraints on Spring Boot's build without
making them visible to consumers. To ensure that the versions that
Spring Boot has been built against are visible to consumers, the
Maven publication that produces pom files and GMM for the published
modules is configured to use the resolved versions from the module's
runtime classpath.

Fixes gh-21911
2020-06-16 08:50:21 +01:00
Scott Frederick
838cfc529f Merge branch '2.3.x'
Closes gh-21933
2020-06-15 16:17:39 -05:00
Scott Frederick
6119d69679 Add runImage option for image building
This commit adds a runImage property to the Maven plugin build-image
goal and the Gradle bootBuildImage task. The property allows the user
to override the run image reference provided in the builder metadata
with an alternate run image. The runImage property can be specified
in the build file or on the command line.

Fixes gh-21534
2020-06-15 16:08:56 -05:00