Resolve bwc dependencies for packer cache (#125625)

This commit is contained in:
Rene Groeschke 2025-03-26 09:59:37 +01:00 committed by GitHub
parent 16441fe3b3
commit 4de4ec1d4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 1 deletions

View file

@ -295,7 +295,16 @@ allprojects {
tasks.register('resolveAllDependencies', ResolveAllDependencies) {
def ignoredPrefixes = [DistributionDownloadPlugin.ES_DISTRO_CONFIG_PREFIX, "jdbcDriver"]
configs = project.configurations.matching { config -> ignoredPrefixes.any { config.name.startsWith(it) } == false }
resolveJavaToolChain = true
if(project.path == ':') {
resolveJavaToolChain = true
// ensure we have best possible caching of bwc builds
dependsOn ":distribution:bwc:bugfix:buildBwcLinuxTar"
dependsOn ":distribution:bwc:bugfix2:buildBwcLinuxTar"
dependsOn ":distribution:bwc:minor:buildBwcLinuxTar"
dependsOn ":distribution:bwc:staged:buildBwcLinuxTar"
dependsOn ":distribution:bwc:staged2:buildBwcLinuxTar"
}
if (project.path.contains("fixture")) {
dependsOn tasks.withType(ComposePull)
}
@ -306,6 +315,7 @@ allprojects {
// ensure we resolve p2 dependencies for the spotless eclipse formatter
dependsOn "spotlessJavaCheck"
}
}
ext.withReleaseBuild = { Closure config ->

View file

@ -19,6 +19,14 @@ public final class MinioTestContainer extends DockerEnvironmentAwareTestContaine
public static final String DOCKER_BASE_IMAGE = "minio/minio:RELEASE.2024-12-18T13-15-44Z";
private final boolean enabled;
/**
* for packer caching only
* see CacheCacheableTestFixtures.
* */
protected MinioTestContainer() {
this(true, "minio", "minio123", "test-bucket");
}
public MinioTestContainer(boolean enabled, String accessKey, String secretKey, String bucketName) {
super(
new ImageFromDockerfile("es-minio-testfixture").withDockerfileFromBuilder(