Skip to content

Commit 9a9384d

Browse files
committed
Resolve bwc dependencies for packer cache (elastic#125625)
1 parent eb2931e commit 9a9384d

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

build.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,16 @@ allprojects {
298298
tasks.register('resolveAllDependencies', ResolveAllDependencies) {
299299
def ignoredPrefixes = [DistributionDownloadPlugin.ES_DISTRO_CONFIG_PREFIX, "jdbcDriver"]
300300
configs = project.configurations.matching { config -> ignoredPrefixes.any { config.name.startsWith(it) } == false }
301-
resolveJavaToolChain = true
301+
if(project.path == ':') {
302+
resolveJavaToolChain = true
303+
304+
// ensure we have best possible caching of bwc builds
305+
dependsOn ":distribution:bwc:bugfix:buildBwcLinuxTar"
306+
dependsOn ":distribution:bwc:bugfix2:buildBwcLinuxTar"
307+
dependsOn ":distribution:bwc:minor:buildBwcLinuxTar"
308+
dependsOn ":distribution:bwc:staged:buildBwcLinuxTar"
309+
dependsOn ":distribution:bwc:staged2:buildBwcLinuxTar"
310+
}
302311
if (project.path.contains("fixture")) {
303312
dependsOn tasks.withType(ComposePull)
304313
}
@@ -309,6 +318,7 @@ allprojects {
309318
// ensure we resolve p2 dependencies for the spotless eclipse formatter
310319
dependsOn "spotlessJavaCheck"
311320
}
321+
312322
}
313323

314324
ext.withReleaseBuild = { Closure config ->

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

Lines changed: 8 additions & 0 deletions
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)