File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,6 @@ pre-flight() {
1111 # Installing git package
1212 pacman -S --noconfirm git
1313
14- # Installing ca-certificates package to avoid SSL issues
15- pacman -S --noconfirm ca-certificates
16- update-ca-trust
17-
1814 # Installing openssh package
1915 if [[ -n " ${SSH_PRIVATE_KEY} " ]]; then
2016 pacman -S --noconfirm openssh
@@ -58,6 +54,19 @@ init_ruby() {
5854
5955 # debug
6056 ruby -v && bundle version
57+
58+ # Update CA certificates to avoid SSL issues
59+ # See https://github.com/ruby/openssl/issues/949
60+ read -r -d ' ' UPDATE_SSL_CODE << EOF
61+ require "openssl"
62+ s = OpenSSL::X509::Store.new.tap(&:set_default_paths)
63+ OpenSSL::SSL::SSLContext.send(:remove_const, :DEFAULT_CERT_STORE) rescue nil
64+ OpenSSL::SSL::SSLContext.const_set(:DEFAULT_CERT_STORE, s.freeze)
65+ EOF
66+ UPDATE_SSL_CODE_PATH=" ${WORKING_DIR} /.rubyopenssl_default_store.rb"
67+ echo " ${UPDATE_SSL_CODE} " > ${UPDATE_SSL_CODE_PATH}
68+ export RUBYOPT=" -r${UPDATE_SSL_CODE_PATH} $RUBYOPT "
69+
6170}
6271
6372pre-flight && init_ruby
You can’t perform that action at this time.
0 commit comments