@@ -57,7 +57,7 @@ class BuildImageTests extends AbstractArchiveIntegrationTests {
57
57
58
58
@ TestTemplate
59
59
void whenBuildImageIsInvokedWithoutRepackageTheArchiveIsRepackagedOnTheFly (MavenBuild mavenBuild ) {
60
- mavenBuild .project ("build-image" )
60
+ mavenBuild .project ("dockerTest" , " build-image" )
61
61
.goals ("package" )
62
62
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
63
63
.prepare (this ::writeLongNameResource )
@@ -77,7 +77,7 @@ void whenBuildImageIsInvokedWithoutRepackageTheArchiveIsRepackagedOnTheFly(Maven
77
77
78
78
@ TestTemplate
79
79
void whenBuildImageIsInvokedOnTheCommandLineWithoutRepackageTheArchiveIsRepackagedOnTheFly (MavenBuild mavenBuild ) {
80
- mavenBuild .project ("build-image-cmd-line" )
80
+ mavenBuild .project ("dockerTest" , " build-image-cmd-line" )
81
81
.goals ("spring-boot:build-image" )
82
82
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
83
83
.prepare (this ::writeLongNameResource )
@@ -97,7 +97,7 @@ void whenBuildImageIsInvokedOnTheCommandLineWithoutRepackageTheArchiveIsRepackag
97
97
98
98
@ TestTemplate
99
99
void whenBuildImageIsInvokedWithClassifierWithoutRepackageTheArchiveIsRepackagedOnTheFly (MavenBuild mavenBuild ) {
100
- mavenBuild .project ("build-image-classifier" )
100
+ mavenBuild .project ("dockerTest" , " build-image-classifier" )
101
101
.goals ("package" )
102
102
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
103
103
.prepare (this ::writeLongNameResource )
@@ -118,7 +118,7 @@ void whenBuildImageIsInvokedWithClassifierWithoutRepackageTheArchiveIsRepackaged
118
118
@ TestTemplate
119
119
void whenBuildImageIsInvokedWithClassifierSourceWithoutRepackageTheArchiveIsRepackagedOnTheFly (
120
120
MavenBuild mavenBuild ) {
121
- mavenBuild .project ("build-image-classifier-source" )
121
+ mavenBuild .project ("dockerTest" , " build-image-classifier-source" )
122
122
.goals ("package" )
123
123
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
124
124
.prepare (this ::writeLongNameResource )
@@ -139,7 +139,7 @@ void whenBuildImageIsInvokedWithClassifierSourceWithoutRepackageTheArchiveIsRepa
139
139
140
140
@ TestTemplate
141
141
void whenBuildImageIsInvokedWithRepackageTheExistingArchiveIsUsed (MavenBuild mavenBuild ) {
142
- mavenBuild .project ("build-image-with-repackage" )
142
+ mavenBuild .project ("dockerTest" , " build-image-with-repackage" )
143
143
.goals ("package" )
144
144
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
145
145
.prepare (this ::writeLongNameResource )
@@ -160,7 +160,7 @@ void whenBuildImageIsInvokedWithRepackageTheExistingArchiveIsUsed(MavenBuild mav
160
160
161
161
@ TestTemplate
162
162
void whenBuildImageIsInvokedWithClassifierAndRepackageTheExistingArchiveIsUsed (MavenBuild mavenBuild ) {
163
- mavenBuild .project ("build-image-classifier-with-repackage" )
163
+ mavenBuild .project ("dockerTest" , " build-image-classifier-with-repackage" )
164
164
.goals ("package" )
165
165
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
166
166
.prepare (this ::writeLongNameResource )
@@ -181,7 +181,7 @@ void whenBuildImageIsInvokedWithClassifierAndRepackageTheExistingArchiveIsUsed(M
181
181
182
182
@ TestTemplate
183
183
void whenBuildImageIsInvokedWithClassifierSourceAndRepackageTheExistingArchiveIsUsed (MavenBuild mavenBuild ) {
184
- mavenBuild .project ("build-image-classifier-source-with-repackage" )
184
+ mavenBuild .project ("dockerTest" , " build-image-classifier-source-with-repackage" )
185
185
.goals ("package" )
186
186
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
187
187
.prepare (this ::writeLongNameResource )
@@ -203,7 +203,7 @@ void whenBuildImageIsInvokedWithClassifierSourceAndRepackageTheExistingArchiveIs
203
203
204
204
@ TestTemplate
205
205
void whenBuildImageIsInvokedWithWarPackaging (MavenBuild mavenBuild ) {
206
- mavenBuild .project ("build-image-war-packaging" )
206
+ mavenBuild .project ("dockerTest" , " build-image-war-packaging" )
207
207
.goals ("package" )
208
208
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
209
209
.prepare (this ::writeLongNameResource )
@@ -223,7 +223,7 @@ void whenBuildImageIsInvokedWithWarPackaging(MavenBuild mavenBuild) {
223
223
224
224
@ TestTemplate
225
225
void whenBuildImageIsInvokedWithCustomImageName (MavenBuild mavenBuild ) {
226
- mavenBuild .project ("build-image-custom-name" )
226
+ mavenBuild .project ("dockerTest" , " build-image-custom-name" )
227
227
.goals ("package" )
228
228
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
229
229
.systemProperty ("spring-boot.build-image.imageName" , "example.com/test/property-ignored:pom-preferred" )
@@ -243,7 +243,7 @@ void whenBuildImageIsInvokedWithCustomImageName(MavenBuild mavenBuild) {
243
243
244
244
@ TestTemplate
245
245
void whenBuildImageIsInvokedWithCommandLineParameters (MavenBuild mavenBuild ) {
246
- mavenBuild .project ("build-image" )
246
+ mavenBuild .project ("dockerTest" , " build-image" )
247
247
.goals ("package" )
248
248
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
249
249
.systemProperty ("spring-boot.build-image.imageName" , "example.com/test/cmd-property-name:v1" )
@@ -266,7 +266,7 @@ void whenBuildImageIsInvokedWithCommandLineParameters(MavenBuild mavenBuild) {
266
266
267
267
@ TestTemplate
268
268
void whenBuildImageIsInvokedWithCustomBuilderImageAndRunImage (MavenBuild mavenBuild ) {
269
- mavenBuild .project ("build-image-custom-builder" )
269
+ mavenBuild .project ("dockerTest" , " build-image-custom-builder" )
270
270
.goals ("package" )
271
271
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
272
272
.execute ((project ) -> {
@@ -281,7 +281,7 @@ void whenBuildImageIsInvokedWithCustomBuilderImageAndRunImage(MavenBuild mavenBu
281
281
282
282
@ TestTemplate
283
283
void whenBuildImageIsInvokedWithEmptyEnvEntry (MavenBuild mavenBuild ) {
284
- mavenBuild .project ("build-image-empty-env-entry" )
284
+ mavenBuild .project ("dockerTest" , " build-image-empty-env-entry" )
285
285
.goals ("package" )
286
286
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
287
287
.prepare (this ::writeLongNameResource )
@@ -297,7 +297,7 @@ void whenBuildImageIsInvokedWithEmptyEnvEntry(MavenBuild mavenBuild) {
297
297
298
298
@ TestTemplate
299
299
void whenBuildImageIsInvokedWithZipPackaging (MavenBuild mavenBuild ) {
300
- mavenBuild .project ("build-image-zip-packaging" )
300
+ mavenBuild .project ("dockerTest" , " build-image-zip-packaging" )
301
301
.goals ("package" )
302
302
.prepare (this ::writeLongNameResource )
303
303
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
@@ -314,7 +314,7 @@ void whenBuildImageIsInvokedWithZipPackaging(MavenBuild mavenBuild) {
314
314
315
315
@ TestTemplate
316
316
void whenBuildImageIsInvokedWithBuildpacks (MavenBuild mavenBuild ) {
317
- mavenBuild .project ("build-image-custom-buildpacks" )
317
+ mavenBuild .project ("dockerTest" , " build-image-custom-buildpacks" )
318
318
.goals ("package" )
319
319
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
320
320
.execute ((project ) -> {
@@ -327,7 +327,7 @@ void whenBuildImageIsInvokedWithBuildpacks(MavenBuild mavenBuild) {
327
327
328
328
@ TestTemplate
329
329
void whenBuildImageIsInvokedWithBinding (MavenBuild mavenBuild ) {
330
- mavenBuild .project ("build-image-bindings" )
330
+ mavenBuild .project ("dockerTest" , " build-image-bindings" )
331
331
.goals ("package" )
332
332
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
333
333
.execute ((project ) -> {
@@ -342,7 +342,7 @@ void whenBuildImageIsInvokedWithBinding(MavenBuild mavenBuild) {
342
342
343
343
@ TestTemplate
344
344
void whenBuildImageIsInvokedWithNetworkModeNone (MavenBuild mavenBuild ) {
345
- mavenBuild .project ("build-image-network" )
345
+ mavenBuild .project ("dockerTest" , " build-image-network" )
346
346
.goals ("package" )
347
347
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
348
348
.execute ((project ) -> {
@@ -356,7 +356,7 @@ void whenBuildImageIsInvokedWithNetworkModeNone(MavenBuild mavenBuild) {
356
356
357
357
@ TestTemplate
358
358
void whenBuildImageIsInvokedOnMultiModuleProjectWithPackageGoal (MavenBuild mavenBuild ) {
359
- mavenBuild .project ("build-image-multi-module" )
359
+ mavenBuild .project ("dockerTest" , " build-image-multi-module" )
360
360
.goals ("package" )
361
361
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
362
362
.execute ((project ) -> {
@@ -369,7 +369,7 @@ void whenBuildImageIsInvokedOnMultiModuleProjectWithPackageGoal(MavenBuild maven
369
369
370
370
@ TestTemplate
371
371
void whenBuildImageIsInvokedWithTags (MavenBuild mavenBuild ) {
372
- mavenBuild .project ("build-image-tags" )
372
+ mavenBuild .project ("dockerTest" , " build-image-tags" )
373
373
.goals ("package" )
374
374
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
375
375
.execute ((project ) -> {
@@ -386,7 +386,7 @@ void whenBuildImageIsInvokedWithTags(MavenBuild mavenBuild) {
386
386
@ TestTemplate
387
387
void whenBuildImageIsInvokedWithVolumeCaches (MavenBuild mavenBuild ) {
388
388
String testBuildId = randomString ();
389
- mavenBuild .project ("build-image-volume-caches" )
389
+ mavenBuild .project ("dockerTest" , " build-image-volume-caches" )
390
390
.goals ("package" )
391
391
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
392
392
.systemProperty ("test-build-id" , testBuildId )
@@ -404,7 +404,7 @@ void whenBuildImageIsInvokedWithVolumeCaches(MavenBuild mavenBuild) {
404
404
+ "Docker Desktop on other OSs" )
405
405
void whenBuildImageIsInvokedWithBindCaches (MavenBuild mavenBuild ) {
406
406
String testBuildId = randomString ();
407
- mavenBuild .project ("build-image-bind-caches" )
407
+ mavenBuild .project ("dockerTest" , " build-image-bind-caches" )
408
408
.goals ("package" )
409
409
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
410
410
.systemProperty ("test-build-id" , testBuildId )
@@ -435,7 +435,7 @@ private static void cleanupCache(Path buildCachePath) {
435
435
@ TestTemplate
436
436
void whenBuildImageIsInvokedWithCreatedDate (MavenBuild mavenBuild ) {
437
437
String testBuildId = randomString ();
438
- mavenBuild .project ("build-image-created-date" )
438
+ mavenBuild .project ("dockerTest" , " build-image-created-date" )
439
439
.goals ("package" )
440
440
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
441
441
.systemProperty ("test-build-id" , testBuildId )
@@ -453,7 +453,7 @@ void whenBuildImageIsInvokedWithCreatedDate(MavenBuild mavenBuild) {
453
453
@ TestTemplate
454
454
void whenBuildImageIsInvokedWithCurrentCreatedDate (MavenBuild mavenBuild ) {
455
455
String testBuildId = randomString ();
456
- mavenBuild .project ("build-image-current-created-date" )
456
+ mavenBuild .project ("dockerTest" , " build-image-current-created-date" )
457
457
.goals ("package" )
458
458
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
459
459
.systemProperty ("test-build-id" , testBuildId )
@@ -476,7 +476,7 @@ void whenBuildImageIsInvokedWithCurrentCreatedDate(MavenBuild mavenBuild) {
476
476
@ TestTemplate
477
477
void whenBuildImageIsInvokedWithApplicationDirectory (MavenBuild mavenBuild ) {
478
478
String testBuildId = randomString ();
479
- mavenBuild .project ("build-image-app-dir" )
479
+ mavenBuild .project ("dockerTest" , " build-image-app-dir" )
480
480
.goals ("package" )
481
481
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
482
482
.systemProperty ("test-build-id" , testBuildId )
@@ -491,7 +491,7 @@ void whenBuildImageIsInvokedWithApplicationDirectory(MavenBuild mavenBuild) {
491
491
@ TestTemplate
492
492
void whenBuildImageIsInvokedWithEmptySecurityOptions (MavenBuild mavenBuild ) {
493
493
String testBuildId = randomString ();
494
- mavenBuild .project ("build-image-security-opts" )
494
+ mavenBuild .project ("dockerTest" , " build-image-security-opts" )
495
495
.goals ("package" )
496
496
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
497
497
.systemProperty ("test-build-id" , testBuildId )
@@ -505,15 +505,15 @@ void whenBuildImageIsInvokedWithEmptySecurityOptions(MavenBuild mavenBuild) {
505
505
506
506
@ TestTemplate
507
507
void failsWhenBuildImageIsInvokedOnMultiModuleProjectWithBuildImageGoal (MavenBuild mavenBuild ) {
508
- mavenBuild .project ("build-image-multi-module" )
508
+ mavenBuild .project ("dockerTest" , " build-image-multi-module" )
509
509
.goals ("spring-boot:build-image" )
510
510
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
511
511
.executeAndFail ((project ) -> assertThat (buildLog (project )).contains ("Error packaging archive for image" ));
512
512
}
513
513
514
514
@ TestTemplate
515
515
void failsWhenBuilderFails (MavenBuild mavenBuild ) {
516
- mavenBuild .project ("build-image-builder-error" )
516
+ mavenBuild .project ("dockerTest" , " build-image-builder-error" )
517
517
.goals ("package" )
518
518
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
519
519
.executeAndFail ((project ) -> assertThat (buildLog (project )).contains ("Building image" )
@@ -524,7 +524,7 @@ void failsWhenBuilderFails(MavenBuild mavenBuild) {
524
524
525
525
@ TestTemplate
526
526
void failsWithBuildpackNotInBuilder (MavenBuild mavenBuild ) {
527
- mavenBuild .project ("build-image-bad-buildpack" )
527
+ mavenBuild .project ("dockerTest" , " build-image-bad-buildpack" )
528
528
.goals ("package" )
529
529
.systemProperty ("spring-boot.build-image.pullPolicy" , "IF_NOT_PRESENT" )
530
530
.executeAndFail ((project ) -> assertThat (buildLog (project ))
@@ -533,15 +533,15 @@ void failsWithBuildpackNotInBuilder(MavenBuild mavenBuild) {
533
533
534
534
@ TestTemplate
535
535
void failsWhenFinalNameIsMisconfigured (MavenBuild mavenBuild ) {
536
- mavenBuild .project ("build-image-final-name" )
536
+ mavenBuild .project ("dockerTest" , " build-image-final-name" )
537
537
.goals ("package" )
538
538
.executeAndFail ((project ) -> assertThat (buildLog (project )).contains ("final-name.jar.original" )
539
539
.contains ("is required for building an image" ));
540
540
}
541
541
542
542
@ TestTemplate
543
543
void failsWhenCachesAreConfiguredTwice (MavenBuild mavenBuild ) {
544
- mavenBuild .project ("build-image-caches-multiple" )
544
+ mavenBuild .project ("dockerTest" , " build-image-caches-multiple" )
545
545
.goals ("package" )
546
546
.executeAndFail ((project ) -> assertThat (buildLog (project ))
547
547
.contains ("Each image building cache can be configured only once" ));
0 commit comments