Automate publishing of devfile gem
Issue: #20 (closed)
What does this MR do and why?
- Introduces the following CI jobs based on a new
.build_and_verify_template
job template to build and verify devfile-gem on different platformsbuild_and_verify_gem_macos
build_and_verify_gem_linux
build_and_verify_gem_ruby
- Introduces the following CI jobs based on a new
.publish_gem_template
job template to build and verify devfile-gem on different platforms-
publish_gem_macos
: uses the gems built as artifacts inbuild_and_verify_gem_macos
job -
publish_gem_linux
: uses the gems built as artifacts inbuild_and_verify_gem_linux
job -
publish_gem_ruby
: uses the gems built as artifacts inbuild_and_verify_gem_ruby
job
-
How to set up and validate locally
The built gems have been verified in the following manner:
- devfile gem for macos:
- Download the artifact from the successful
build_and_verify_gem_macos
job - Install locally on macos using
gem install {gem_artifact}
- Execute sample code in local IRB session to verify that the gem works
- Download the artifact from the successful
- devfile gem for linux:
- Download the artifact from the successful
build_and_verify_gem_linux
job - Upload the artifact to a Remote Development session and install using
gem install --user-install {gem_artifact}
.--user-install
must be used as root access is not available in the RD session - Execute sample code in local IRB session to verify that the gem works
- Download the artifact from the successful
- devfile gem for ruby:
- Download the artifact from the successful
build_and_verify_gem_ruby
job - Install locally on macos using
gem install {gem_artifact}
. This should work on macOS because, as per the build guidelines, gems forruby
platform are built locally on a macOS machines so the go binary will be compiled for macOS architecure. - Execute sample code in local IRB session to verify that the gem works
- Download the artifact from the successful
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Hunar Khanna