Skip to content

Automate publishing of devfile gem

Hunar Khanna requested to merge hkhanna2_automate_gem_publish_20231031 into main

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 platforms
    • build_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 in build_and_verify_gem_macos job
    • publish_gem_linux: uses the gems built as artifacts in build_and_verify_gem_linux job
    • publish_gem_ruby: uses the gems built as artifacts in build_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:
    1. Download the artifact from the successful build_and_verify_gem_macos job
    2. Install locally on macos using gem install {gem_artifact}
    3. Execute sample code in local IRB session to verify that the gem works
  • devfile gem for linux:
    1. Download the artifact from the successful build_and_verify_gem_linux job
    2. 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
    3. Execute sample code in local IRB session to verify that the gem works
  • devfile gem for ruby:
    1. Download the artifact from the successful build_and_verify_gem_ruby job
    2. Install locally on macos using gem install {gem_artifact}. This should work on macOS because, as per the build guidelines, gems for ruby platform are built locally on a macOS machines so the go binary will be compiled for macOS architecure.
    3. Execute sample code in local IRB session to verify that the gem works

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Hunar Khanna

Merge request reports

Loading