Skip to content

Commit 4de4ec1

Browse files
authored
Resolve bwc dependencies for packer cache (#125625)
1 parent 16441fe commit 4de4ec1

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

Diff for: build.gradle

+11-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,16 @@ allprojects {
295295
tasks.register('resolveAllDependencies', ResolveAllDependencies) {
296296
def ignoredPrefixes = [DistributionDownloadPlugin.ES_DISTRO_CONFIG_PREFIX, "jdbcDriver"]
297297
configs = project.configurations.matching { config -> ignoredPrefixes.any { config.name.startsWith(it) } == false }
298-
resolveJavaToolChain = true
298+
if(project.path == ':') {
299+
resolveJavaToolChain = true
300+
301+
// ensure we have best possible caching of bwc builds
302+
dependsOn ":distribution:bwc:bugfix:buildBwcLinuxTar"
303+
dependsOn ":distribution:bwc:bugfix2:buildBwcLinuxTar"
304+
dependsOn ":distribution:bwc:minor:buildBwcLinuxTar"
305+
dependsOn ":distribution:bwc:staged:buildBwcLinuxTar"
306+
dependsOn ":distribution:bwc:staged2:buildBwcLinuxTar"
307+
}
299308
if (project.path.contains("fixture")) {
300309
dependsOn tasks.withType(ComposePull)
301310
}
@@ -306,6 +315,7 @@ allprojects {
306315
// ensure we resolve p2 dependencies for the spotless eclipse formatter
307316
dependsOn "spotlessJavaCheck"
308317
}
318+
309319
}
310320

311321
ext.withReleaseBuild = { Closure config ->

Diff for: test/fixtures/minio-fixture/src/main/java/org/elasticsearch/test/fixtures/minio/MinioTestContainer.java

+8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ public final class MinioTestContainer extends DockerEnvironmentAwareTestContaine
1919
public static final String DOCKER_BASE_IMAGE = "minio/minio:RELEASE.2024-12-18T13-15-44Z";
2020
private final boolean enabled;
2121

22+
/**
23+
* for packer caching only
24+
* see CacheCacheableTestFixtures.
25+
* */
26+
protected MinioTestContainer() {
27+
this(true, "minio", "minio123", "test-bucket");
28+
}
29+
2230
public MinioTestContainer(boolean enabled, String accessKey, String secretKey, String bucketName) {
2331
super(
2432
new ImageFromDockerfile("es-minio-testfixture").withDockerfileFromBuilder(

0 commit comments

Comments
 (0)