@@ -33,23 +33,6 @@ repositories {
33
33
metadataSources { artifact() }
34
34
content { includeGroup ' krallin' }
35
35
}
36
-
37
- // Cloud builds bundle some beats
38
- ivy {
39
- if (useLocalArtifacts) {
40
- url " file://${ buildDir} /artifacts/"
41
- patternLayout {
42
- artifact ' /[organisation]/[module]-[revision]-linux-[classifier].[ext]'
43
- }
44
- } else {
45
- url " https://${ VersionProperties.isElasticsearchSnapshot() ? 'snapshots' : 'artifacts'} -no-kpi.elastic.co/"
46
- patternLayout {
47
- artifact ' /downloads/[organization]/[module]/[module]-[revision]-linux-[classifier].[ext]'
48
- }
49
- }
50
- metadataSources { artifact() }
51
- content { includeGroup ' beats' }
52
- }
53
36
}
54
37
55
38
testFixtures. useFixture()
@@ -59,24 +42,15 @@ configurations {
59
42
dockerSource
60
43
log4jConfig
61
44
tini
62
- repositoryPlugins
63
- nonRepositoryPlugins
64
- filebeat
65
- metricbeat
66
45
}
67
46
68
- String beatsArch = Architecture . current() == Architecture . AARCH64 ? ' arm64' : ' x86_64'
69
47
String tiniArch = Architecture . current() == Architecture . AARCH64 ? ' arm64' : ' amd64'
70
48
71
49
dependencies {
72
50
aarch64DockerSource project(path : " :distribution:archives:linux-aarch64-tar" , configuration : ' default' )
73
51
dockerSource project(path : " :distribution:archives:linux-tar" , configuration : ' default' )
74
52
log4jConfig project(path : " :distribution" , configuration : ' log4jConfig' )
75
53
tini " krallin:tini:0.19.0:${ tiniArch} "
76
- repositoryPlugins project(path : ' :plugins' , configuration : ' repositoryPlugins' )
77
- nonRepositoryPlugins project(path : ' :plugins' , configuration : ' nonRepositoryPlugins' )
78
- filebeat " beats:filebeat:${ VersionProperties.elasticsearch} :${ beatsArch} @tar.gz"
79
- metricbeat " beats:metricbeat:${ VersionProperties.elasticsearch} :${ beatsArch} @tar.gz"
80
54
}
81
55
82
56
ext. expansions = { Architecture architecture , DockerBase base ->
@@ -254,22 +228,6 @@ void addBuildDockerContextTask(Architecture architecture, DockerBase base) {
254
228
}
255
229
}
256
230
257
- if (base == DockerBase . CLOUD ) {
258
- // If we're performing a release build, but `build.id` hasn't been set, we can
259
- // infer that we're not at the Docker building stage of the build, and therefore
260
- // we should skip the beats part of the build.
261
- String buildId = providers. systemProperty(' build.id' ). forUseAtConfigurationTime(). getOrNull()
262
- boolean includeBeats = VersionProperties . isElasticsearchSnapshot() == true || buildId != null
263
-
264
- from configurations. repositoryPlugins
265
- if (includeBeats) {
266
- from configurations. filebeat
267
- from configurations. metricbeat
268
- }
269
- // For some reason, the artifact name can differ depending on what repository we used.
270
- rename ~/ ((?:file|metric)beat)-.*\. tar\. gz$/ , " \$ 1-${ VersionProperties.elasticsearch} .tar.gz"
271
- }
272
-
273
231
onlyIf { Architecture . current() == architecture }
274
232
}
275
233
@@ -324,11 +282,7 @@ private static List<String> generateTags(DockerBase base) {
324
282
final String version = VersionProperties . elasticsearch
325
283
326
284
String image = " elasticsearch${ base.suffix} "
327
-
328
285
String namespace = ' elasticsearch'
329
- if (base == DockerBase . CLOUD || base == DockerBase . CLOUD_ESS ) {
330
- namespace + = ' -ci'
331
- }
332
286
333
287
return [
334
288
" ${ image} :test" ,
@@ -371,68 +325,19 @@ void addBuildDockerImageTask(Architecture architecture, DockerBase base) {
371
325
onlyIf { Architecture . current() == architecture }
372
326
}
373
327
374
- if (base != DockerBase . IRON_BANK && base != DockerBase . CLOUD && base != DockerBase . CLOUD_ESS ) {
328
+ if (base != DockerBase . IRON_BANK ) {
375
329
tasks. named(" assemble" ). configure {
376
330
dependsOn(buildDockerImageTask)
377
331
}
378
332
}
379
333
}
380
334
381
- void addBuildEssDockerImageTask (Architecture architecture ) {
382
- DockerBase base = DockerBase . CLOUD_ESS
383
- String arch = architecture == Architecture . AARCH64 ? ' -aarch64' : ' '
384
- String contextDir = " ${ project.buildDir} /docker-context/elasticsearch${ base.suffix} -${ VersionProperties.elasticsearch} -docker-build-context${ arch} "
385
-
386
- final TaskProvider<Sync > buildContextTask =
387
- tasks. register(taskName(' build' , architecture, base, ' DockerContext' ), Sync ) {
388
- into contextDir
389
-
390
- final Path projectDir = project. projectDir. toPath()
391
-
392
- into(" plugins" ) {
393
- from configurations. nonRepositoryPlugins
394
- }
395
-
396
- from(projectDir. resolve(" src/docker/Dockerfile.cloud-ess" )) {
397
- expand([
398
- base_image : " elasticsearch${ DockerBase.CLOUD.suffix} :${ VersionProperties.elasticsearch} "
399
- ])
400
- filter SquashNewlinesFilter
401
- rename ~/ Dockerfile\. cloud-ess$/ , ' Dockerfile'
402
- }
403
- }
404
-
405
- final TaskProvider<DockerBuildTask > buildDockerImageTask =
406
- tasks. register(taskName(" build" , architecture, base, " DockerImage" ), DockerBuildTask ) {
407
-
408
- TaskProvider<DockerBuildTask > buildCloudTask = tasks. named(taskName(" build" , architecture, DockerBase . CLOUD , " DockerImage" ))
409
- inputs. files(buildCloudTask)
410
-
411
- dockerContext. fileProvider(buildContextTask. map { it. getDestinationDir() })
412
-
413
- noCache = BuildParams . isCi
414
- baseImages = []
415
- tags = generateTags(base)
416
-
417
- onlyIf { Architecture . current() == architecture }
418
- }
419
-
420
- tasks. named(" assemble" ). configure {
421
- dependsOn(buildDockerImageTask)
422
- }
423
- }
424
-
425
335
for (final Architecture architecture : Architecture . values()) {
426
336
for (final DockerBase base : DockerBase . values()) {
427
- if (base == DockerBase . CLOUD_ESS ) {
428
- continue
429
- }
430
337
addBuildDockerContextTask(architecture, base)
431
338
addTransformDockerContextTask(architecture, base)
432
339
addBuildDockerImageTask(architecture, base)
433
340
}
434
-
435
- addBuildEssDockerImageTask(architecture)
436
341
}
437
342
438
343
/*
@@ -449,18 +354,12 @@ subprojects { Project subProject ->
449
354
base = DockerBase . UBI
450
355
} else if (subProject. name. contains(' ironbank-' )) {
451
356
base = DockerBase . IRON_BANK
452
- } else if (subProject. name. contains(' cloud-ess-' )) {
453
- base = DockerBase . CLOUD_ESS
454
- } else if (subProject. name. contains(' cloud-' )) {
455
- base = DockerBase . CLOUD
456
357
}
457
358
458
359
final String arch = architecture == Architecture . AARCH64 ? ' -aarch64' : ' '
459
360
final String extension = base == DockerBase . UBI ? ' ubi.tar' :
460
361
(base == DockerBase . IRON_BANK ? ' ironbank.tar' :
461
- (base == DockerBase . CLOUD ? ' cloud.tar' :
462
- (base == DockerBase . CLOUD_ESS ? ' cloud-ess.tar' :
463
- ' docker.tar' )))
362
+ ' docker.tar' )
464
363
final String artifactName = " elasticsearch${ arch}${ base.suffix} _test"
465
364
466
365
final String exportTaskName = taskName(" export" , architecture, base, ' DockerImage' )
0 commit comments