Build: properly isolate integration (test) env setup (#12364)

to avoid gems being resolved from the usual LS GEM_HOME

this is problematic for gems such as jruby-openssl which are loaded
during boot (by RGs/Bundler) and thus activated in Bundler from a
different GEM_HOME. if such gem is updated it won't end up being
install-ed in the --path location as it's found on the GEM_HOME!

+ Fix: gem conflict 1.3.6 required by core
this is due now isolating GEM_HOME on `bundle install --path`

+ Refactor: we do not need LS_GEM_HOME/PATH

+ avoid pinning jruby-openssl to 0.10.4

resolves GH-12299 (reverting GH-12301)
This commit is contained in:
Karol Bucek 2020-10-20 09:00:01 +02:00 committed by GitHub
parent 0727260c71
commit a693fa3bf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 6 deletions

View file

@ -316,8 +316,9 @@ tasks.register("unpackTarDistribution", Copy) {
into {buildDir}
}
def qaVendorPath = "${buildDir}/qa/integration/vendor"
def qaBundledGemPath = "${qaVendorPath}/jruby/2.5.0"
def qaBuildPath = "${buildDir}/qa/integration"
def qaVendorPath = "${qaBuildPath}/vendor"
def qaBundledGemPath = "${qaVendorPath}/jruby/2.5.0".toString()
def qaBundleBin = "${qaBundledGemPath}/bin/bundle"
tasks.register("installIntegrationTestBundler"){
@ -340,8 +341,8 @@ tasks.register("installIntegrationTestGems") {
doLast {
bundleWithEnv(
projectDir, buildDir,
"${projectDir}/qa/integration", qaBundleBin, ['install', '--path', qaVendorPath],
[LS_GEM_PATH: qaBundledGemPath, LS_GEM_HOME: qaBundledGemPath]
qaBuildPath, qaBundleBin, ['install', '--path', qaVendorPath],
[ GEM_PATH: qaBundledGemPath, GEM_HOME: qaBundledGemPath ]
)
}
}

View file

@ -57,7 +57,7 @@ Gem::Specification.new do |gem|
gem.add_runtime_dependency "mustermann", '~> 1.0.3'
gem.add_runtime_dependency "sinatra", '~> 2'
gem.add_runtime_dependency 'puma', '~> 4'
gem.add_runtime_dependency "jruby-openssl", "= 0.10.4" # >= 0.9.13 Required to support TLSv1.2; 0.10.5 is causing dependency issue in integration test #12299
gem.add_runtime_dependency "jruby-openssl", "~> 0.10" # >= 0.9.13 Required to support TLSv1.2
gem.add_runtime_dependency "chronic_duration", "~> 0.10"
gem.add_runtime_dependency "treetop", "~> 1" #(MIT license)

View file

@ -19,7 +19,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'stud', '~> 0.0.22'
s.add_development_dependency 'pry'
s.add_development_dependency 'rspec', '~> 3.5'
s.add_development_dependency 'logstash-devutils', '= 1.3.5'
s.add_development_dependency 'logstash-devutils'
s.add_development_dependency 'flores'
s.add_development_dependency 'rubyzip'
end