opensearch-project / opensearch-build-libraries

Apache License 2.0
6 stars 23 forks source link

[Bug]: Cannot release opensearch-ruby 3.2.0 because of `publishToRubyGems` RVM issues #410

Closed Earlopain closed 3 months ago

Earlopain commented 3 months ago

Describe the bug

Here's the action being run: https://github.com/opensearch-project/opensearch-build-libraries/blob/6d35e942e98e1acddd88633a2aa1bbe39ab5e002/vars/publishToRubyGems.groovy#L25-L35

Notice the absoulte path to RVM. In https://github.com/opensearch-project/opensearch-build/commit/01613af16774cfe39bf41ab23bf2fdf27a78b95f the path where RVM gets installed to got changed, so this invocation doesn't work anymore. If $CONTAINER_USER_HOME is available in this script, that should be used instead.

This issue prevents opensearch-ruby from releasing a new version. Also see https://github.com/opensearch-project/opensearch-build/issues/4624 and https://github.com/opensearch-project/opensearch-ruby/issues/238.

Here is a successful pipeline: https://build.ci.opensearch.org/blue/organizations/jenkins/opensearch-ruby-gems-release/detail/opensearch-ruby-gems-release/29/pipeline/ This one is not able to switch ruby versions because RVM isn't at the expected path: https://build.ci.opensearch.org/blue/organizations/jenkins/opensearch-ruby-gems-release/detail/opensearch-ruby-gems-release/31/pipeline/

To reproduce

ssh into one of the https://github.com/opensearch-project/opensearch-build docker images and try to execute the script from publishToRubyGems without errors.

Expected behavior

publishToRubyGems should be able to switch to available Ruby versions

Screenshots

No response

Host / Environment

No response

Additional context

No response

Relevant log output

/var/jenkins/workspace/opensearch-ruby-gems-release@tmp/durable-1e102f6a/script.sh: line 3: /usr/share/opensearch/.rvm/scripts/rvm: No such file or directory