Skip to main content

Using Expeditor to build Ruby gems

Note

This document does not apply to the chef/chef project, which has some historical processes in place for how it builds its and publishes its Ruby gems to Artifactory.

The process for building a Ruby gem differs from other pipeline documentation in that there is no shim pipeline definition that is used to build Ruby gems as part of a Buildkite pipeline. This process is likely to change, but this is the process as it exists today.

As we mention in our Ruby gems promotion walk-through, unlike with other artifact types there is no mechanism by which to introduce the concept of channels. To solve this we manage two completely independency RubyGems repositories:

  • Chef’s internal Artifactory, which is treated as “unstable”
  • RubyGems.org, which is treated as “stable”

Ruby gems are built on Expeditor’s Linux host using the built_in:build_gem action, typically in response to the pull_request_merged workload. Which gems you build, and where their gemspec files are located, is managed using the rubygems configuration.

Because we build the gems on Expeditor’s Linux host there are limitations in the types of gems we can build. If you find yourself needing to build a gem that cannot be cross-compiled on a Linux host, please reach out to the Release Engineering team.

.expeditor/config.yml
---
rubygems:
  - example

subscriptions:
  - workload: pull_request_merged:{{github_repo}}:{{release_branch}}:*
    actions:
      - built_in:build_gem