Skip to content
Snippets Groups Projects
Commit 3c80abcb authored by Robert Marshall's avatar Robert Marshall
Browse files

Merge branch 'sh-fix-default-gem-cache' into 'master'

Ensure Ruby default gem directories are preserved in cache

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/8193



Merged-by: default avatarRobert Marshall <rmarshall@gitlab.com>
Approved-by: default avatarRobert Marshall <rmarshall@gitlab.com>
Co-authored-by: default avatarStan Hu <stanhu@gmail.com>
parents 27d4f944 828beec5
No related branches found
No related tags found
No related merge requests found
......@@ -181,4 +181,10 @@
# Install OpenSSL gem for FIPS fixes
gem "install openssl --version '#{Gitlab::Util.get_env('OPENSSL_GEM_VERSION')}' --force --no-document"
block 'ensure default gem directories are preserved' do
Dir["#{install_dir}/embedded/lib/ruby/gems/#{ruby_version}.0/gems/*/"].each do |dir|
File.write(File.join(dir, '.gitkeep'), '') if File.directory?(dir)
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment