opensearch-project / opensearch-build-libraries

Apache License 2.0
6 stars 23 forks source link

Adapt RubyGems publish action to path changes #413

Closed Earlopain closed 3 months ago

Earlopain commented 3 months ago

Description

In https://github.com/opensearch-project/opensearch-build/commit/01613af16774cfe39bf41ab23bf2fdf27a78b95f the docker user got changed. As such the users home folder location got changed as well, which didn't get reflected in the rubygems publish action.

This can be seen in the latest publish attempt of opensearch-ruby: https://build.ci.opensearch.org/blue/organizations/jenkins/opensearch-ruby-gems-release/detail/opensearch-ruby-gems-release/31/pipeline/

script.sh: line 3: /usr/share/opensearch/.rvm/scripts/rvm: No such file or directory

In order for a ruby version to be selected the path to rvm must be updated. This PR does that by simply using ~, unblocking a new release of opensearch-ruby.

Old output:

[ci-runner@b51ea2c5f5d2 ~]$ source /usr/share/opensearch/.rvm/scripts/rvm && rvm use 2.6.0 && ruby --version
bash: /usr/share/opensearch/.rvm/scripts/rvm: No such file or directory

New output:

[ci-runner@b51ea2c5f5d2 ~]$ source ~/.rvm/scripts/rvm && rvm use 2.6.0 && ruby --version
Using /home/ci-runner/.rvm/gems/ruby-2.6.0
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]

Issues Resolved

Closes #410

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

gaiksaya commented 3 months ago

Hi @Earlopain Can you bump the version here to next patch? https://github.com/Earlopain/opensearch-build-libraries/blob/rvm-path/build.gradle#L124 Thanks!

Earlopain commented 3 months ago

Thanks for taking care of the bumping! I thought a bot would do that.