Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ private void configureDraRepository(
patternLayout.artifact(
String.format("/%s/%s/downloads/%s/[module]/[module]-[revision]-[classifier].[ext]", draKey, buildId, draKey)
);

if ("beats".equals(draKey)) {
// we don't have a good pattern here for beats fips specific images
patternLayout.artifact(
String.format("/%s/%s/downloads/%s/metricbeat/[module]-[revision]-[classifier].[ext]", draKey, buildId, draKey)
);
patternLayout.artifact(
String.format("/%s/%s/downloads/%s/filebeat/[module]-[revision]-[classifier].[ext]", draKey, buildId, draKey)
);
}
});
repo.metadataSources(metadataSources -> metadataSources.artifact());
repo.content(repositoryContentDescriptor -> repositoryContentDescriptor.includeVersionByRegex(".*", ".*", includeVersionRegex));
Expand Down
19 changes: 17 additions & 2 deletions distribution/docker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,14 @@ if (useDra == false) {
patternLayout {
if (VersionProperties.isElasticsearchSnapshot()) {
artifact '/[organization]/[revision]/downloads/[organization]/[module]/[module]-[revision]-[classifier].[ext]'
artifact '/[organization]/[revision]/downloads/[organization]/filebeat/[module]-[revision]-[classifier].[ext]'
artifact '/[organization]/[revision]/downloads/[organization]/metricbeat/[module]-[revision]-[classifier].[ext]'
} else {
// When building locally we always use snapshot artifacts even if passing `-Dbuild.snapshot=false`.
// Release builds are always done with a local repo.
artifact '/[organization]/[revision]-SNAPSHOT/downloads/[organization]/[module]/[module]-[revision]-SNAPSHOT-[classifier].[ext]'
artifact '/[organization]/[revision]-SNAPSHOT/downloads/[organization]/filebeat/[module]-[revision]-SNAPSHOT-[classifier].[ext]'
artifact '/[organization]/[revision]-SNAPSHOT/downloads/[organization]/metricbeat/[module]-[revision]-SNAPSHOT-[classifier].[ext]'
}
}
}
Expand Down Expand Up @@ -93,9 +97,13 @@ configurations {
tini
allPlugins
filebeat_aarch64
filebeat_fips_aarch64
filebeat_x86_64
filebeat_fips_x86_64
metricbeat_aarch64
metricbeat_fips_aarch64
metricbeat_x86_64
metricbeat_fips_x86_64
fips
}

Expand All @@ -111,8 +119,15 @@ dependencies {
allPlugins project(path: ':plugins', configuration: 'allPlugins')
filebeat_aarch64 "beats:filebeat:${VersionProperties.elasticsearch}:[email protected]"
filebeat_x86_64 "beats:filebeat:${VersionProperties.elasticsearch}:[email protected]"
filebeat_fips_aarch64 "beats:filebeat-fips:${VersionProperties.elasticsearch}:[email protected]"
filebeat_fips_x86_64 "beats:filebeat-fips:${VersionProperties.elasticsearch}:[email protected]"

metricbeat_aarch64 "beats:metricbeat:${VersionProperties.elasticsearch}:[email protected]"
metricbeat_x86_64 "beats:metricbeat:${VersionProperties.elasticsearch}:[email protected]"

metricbeat_fips_aarch64 "beats:metricbeat-fips:${VersionProperties.elasticsearch}:[email protected]"
metricbeat_fips_x86_64 "beats:metricbeat-fips:${VersionProperties.elasticsearch}:[email protected]"

fips "org.bouncycastle:bc-fips:1.0.2.5"
fips "org.bouncycastle:bctls-fips:1.0.19"
}
Expand Down Expand Up @@ -301,8 +316,8 @@ void addBuildDockerContextTask(Architecture architecture, DockerBase base) {
boolean includeBeats = VersionProperties.isElasticsearchSnapshot() == true || buildId != null || useDra

if (includeBeats) {
from configurations.getByName("filebeat_${architecture.classifier}")
from configurations.getByName("metricbeat_${architecture.classifier}")
from configurations.getByName("filebeat_fips_${architecture.classifier}")
from configurations.getByName("metricbeat_fips_${architecture.classifier}")
// For some reason, the artifact name can differ depending on what repository we used.
rename ~/((?:file|metric)beat)-.*\.tar\.gz$/, "\$1-${VersionProperties.elasticsearch}.tar.gz"
}
Expand Down
2 changes: 2 additions & 0 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
<verify-signatures>false</verify-signatures>
<trusted-artifacts>
<trust group="beats" name="filebeat"/>
<trust group="beats" name="filebeat-fips"/>
<trust group="beats" name="metricbeat"/>
<trust group="beats" name="metricbeat-fips"/>
<trust group="elasticsearch-distribution" name="elasticsearch"/>
<trust group="org.elasticsearch"/>
<trust group="org.elasticsearch.distribution.zip" name="elasticsearch"/>
Expand Down