Skip to content

Commit bd4cec0

Browse files
authored
Only ship x-pack library code with artifacts (#18548)
* Only ship x-pack library code with artifacts This commit updates artifact generation to *only* include x-pack files which are needed at runtime for consumers of an artifact. Previously *all* files (including build/test/conf) were shipped which are unused at runtime and clutter up artifacts. * add config in observabilitySRE artifact For observabilitySRE container, add in fips config. Previously this was bulk included with EVERY file under x-pack.
1 parent ae9fce6 commit bd4cec0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

rakelib/artifacts.rake

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ namespace "artifact" do
7070
"vendor/jruby/bin/.jruby.module_opts",
7171
"Gemfile",
7272
"Gemfile.lock",
73-
"x-pack/**/*",
73+
"x-pack/lib/**/*",
7474
]
7575
if @bundles_jdk
7676
res += [
@@ -263,9 +263,10 @@ namespace "artifact" do
263263
)
264264
license_details = ['ELASTIC-LICENSE','-observability-sre', exclude_paths]
265265
create_archive_pack(license_details, ARCH, "linux") do |dedicated_directory_tar|
266-
# injection point: Use `DedicatedDirectoryTarball#write(source_file, destination_path)` to
267-
# copy additional files into the tarball
268-
puts "HELLO(#{dedicated_directory_tar})"
266+
Dir.glob("x-pack/distributions/internal/observabilitySRE/config/**/*").each do |source_file|
267+
next if File.directory?(source_file)
268+
dedicated_directory_tar.write(source_file)
269+
end
269270
end
270271
end
271272

0 commit comments

Comments
 (0)