Skip to content

Commit

Permalink
rpm deb: group logging
Browse files Browse the repository at this point in the history
Improve readability on GitHub Actions.

Signed-off-by: Kentaro Hayashi <[email protected]>
  • Loading branch information
kenhys committed Jul 23, 2024
1 parent 208331d commit 9b27e8e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fluent-package/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -445,18 +445,22 @@ class BuildTask

desc "Install fluentd"
task :fluentd => [:"download:fluentd", windows? ? :rubyinstaller : :ruby] do
puts "::group::Install fluentd" if ENV["CI"]
cd(DOWNLOADS_DIR) do
archive_path = @download_task.file_fluentd_archive
fluentd_dir = archive_path.sub(/\.tar\.gz$/, '')
tar_options = ["--no-same-owner"]
tar_options << "--force-local" if windows?
puts "::group::Extract archive: #{archive_path}" if ENV["CI"]
sh(*tar_command, "xvf", archive_path, *tar_options) unless File.exist?(fluentd_dir)
puts "::endgroup::" if ENV["CI"]
cd("fluentd-#{FLUENTD_REVISION}") do
sh("rake", "build")
setup_local_gem_repo
install_gemfiles
end
end
puts "::endgroup::" if ENV["CI"]
end

desc "Install win32-service"
Expand Down Expand Up @@ -662,6 +666,7 @@ class BuildTask
end

def build_jemalloc
puts "::group::Build jemalloc from source" if ENV["CI"]
tarball = @download_task.file_jemalloc_source
source_dir = tarball.sub(/\.tar\.bz2$/, '')

Expand Down Expand Up @@ -693,6 +698,7 @@ class BuildTask
sh("./configure", *configure_opts)
sh("make", "install", "-j#{Etc.nprocessors}", "DESTDIR=#{STAGING_DIR}")
end
puts "::endgroup::" if ENV["CI"]
end

def openssldir
Expand Down Expand Up @@ -771,6 +777,7 @@ class BuildTask
end

def build_ruby_from_source
puts "::group::Build ruby from source" if ENV["CI"]
tarball = @download_task.file_ruby_source
ruby_source_dir = tarball.sub(/\.tar\.gz$/, '')

Expand All @@ -797,6 +804,7 @@ class BuildTask
# For building gems. The built ruby & gem command cannot use without install.
sh("make", "install")
end
puts "::endgroup::" if ENV["CI"]
end

def extract_ruby_installer
Expand Down Expand Up @@ -1321,7 +1329,9 @@ EOS
cp(File.join(__dir__, "debian", "copyright"), File.join(@archive_base_name, File.basename(__dir__), "debian", "copyright"))
tar_options = []
tar_options << "--force-local" if windows?
puts "::group::Create archive: #{@full_archive_name}"
sh(*tar_command, "cvfz", @full_archive_name, @archive_base_name, *tar_options)
puts "::endgroup::"
rm_rf(@archive_base_name)
end
end
Expand Down

0 comments on commit 9b27e8e

Please sign in to comment.