CircleCI-Public / ruby-orb

The `circleci/ruby` orb source code.
https://circleci.com/developer/orbs/orb/circleci/ruby
MIT License
25 stars 53 forks source link

Can't use openssl > 1.9 and openssl version is defaulting to 1.0.1 #132

Closed nicklevenson closed 1 week ago

nicklevenson commented 1 year ago

Orb version: 2.1.0

What happened:

Our CI builds started failing at the bundle step because there stopped being an openssl link when bundling. We tried to manually install openssl before installing ruby eg sudo apt-get update && sudo apt-get install -y openssl which installs the latest openssl version 3.

When rvm was installed via the ruby/install step, we noticed theres a check in the orb that looks for an existing ssl version to use in the opts flags, but it only looks for versions within the 1 range. eg if ! openssl version | grep -q -E '1\\.[0-9]+\\.[0-9]+'. If the version is outside of that regex, it installs openssl 1.0.1 by default. This version (less than 1.1.1) causes issues with ssl certs when using sidekiq-pro (and assuming other gems) and prevents bundling from happening

Expected behavior:

I would hope the system would use any openssl version that was already installed on the machine, or at least default to using the latest 1 version instead of the oldest.

marboledacci commented 1 week ago

Any of the alternatives you propose could cause issues in different setups, and adding different situations in the logic might not be enough. I was thinking in adding a new parameter to specify the OpenSSL path in case you are using a version different to the rvm default (1.0.1), would this be a good solution for your situation?

marboledacci commented 1 week ago

Version 2.2.0 has the feature to specify your own OpenSSL path, this should help fixing this issue so I'm closing it. If it is not enough, feel free to reopen or open a new one.