Skip to content

Migrate from Gemstash to Cloudsmith#20

Draft
pawfectshah wants to merge 2 commits into
mainfrom
cloudsmith-migration
Draft

Migrate from Gemstash to Cloudsmith#20
pawfectshah wants to merge 2 commits into
mainfrom
cloudsmith-migration

Conversation

@pawfectshah
Copy link
Copy Markdown

Summary

Gemstash is being sunset org-wide; this PR moves the repo onto Cloudsmith for read-path access to private gems and adopts the canonical cloudsmith-auth-buildkite-plugin for CI credential minting.

The publish step still pushes to public rubygems.org (gem push --key rubygems) — that is unaffected by the Gemstash sunset. The agents queue: gemstash-publish label is preserved verbatim per migration convention (it is a queue label, not a coupling to Gemstash; the queue still has the publish-specific network/permissions config).

Changes

  • Gemfile — source URL swapped from https://rubygems.org to https://dl.cloudsmith.io/basic/gusto/gusto/ruby/. Cloudsmith proxies rubygems.org transparently for public gems, so one source covers both private and public deps.
  • Gemfile.lockremote: URL updated to match the Gemfile. Hand-edited (not regenerated locally); bundler will reconcile on the first CI run.
  • Dockerfile.test
    • added # syntax=docker/dockerfile:1.10.0 directive for --mount=type=secret support.
    • dropped the legacy bundle config --local "mirror.https://rubygems.org" "https://gemstash.zp-int.com" line; not needed once the source is Cloudsmith.
    • the bundle install RUN now mounts the cloudsmith_api_key BuildKit secret and assigns BUNDLE_DL__CLOUDSMITH__IO inline on the same line.
  • .buildkite/docker-compose.yml (new) — wires the cloudsmith_api_key secret into the docker build context (sourced from the CLOUDSMITH_API_KEY env var minted by the cloudsmith-auth plugin) and forwards CLOUDSMITH_API_KEY to the runner container.
  • .buildkite/pipeline.yml
    • rspec and sorbet steps moved off the legacy BUILDKITE_DOCKER/BUILDKITE_DOCKER_FILE env-based docker driver and onto the docker-compose#v5.6.0 plugin, with cloudsmith-auth-buildkite-plugin#v2.2.0 attached for credential minting.
    • publish step is untouched apart from re-grouping; same command, same gemstash-publish queue.

Validation

  • YAML files parse cleanly (pipeline.yml, docker-compose.yml).
  • CI will exercise the end-to-end read path on first build of this PR.
  • Pattern matches Gusto/danger-gusto (same agent/queue/topology, also-published gem).

Rollback

Revert this PR. Gemstash continues to serve in parallel during the sunset window, so the previous read path is recoverable until Gemstash is fully retired.

Gemstash is being sunset org-wide; Cloudsmith replaces it with
OIDC-minted CI credentials and a single private+public gem source.

Read-path changes:
- Gemfile: source rubygems.org -> dl.cloudsmith.io/basic/gusto/gusto/ruby/
  (Cloudsmith proxies rubygems.org for public gems)
- Gemfile.lock: remote URL updated to match (hand-edited; lockfile is
  not regenerated locally and will reconcile on first CI run)
- Dockerfile.test:
  - add BuildKit syntax directive
  - drop the legacy bundler mirror line pointing at gemstash
  - mount cloudsmith_api_key as a BuildKit secret and set
    BUNDLE_DL__CLOUDSMITH__IO inline on the bundle install RUN
- .buildkite/docker-compose.yml (new): wires the cloudsmith_api_key
  secret into the docker build context and forwards CLOUDSMITH_API_KEY
  to the runner container
- .buildkite/pipeline.yml:
  - rspec + sorbet steps now run via the docker-compose plugin with the
    cloudsmith-auth plugin attached (v2.2.0)
  - publish step is unchanged (gem still pushes to public rubygems.org;
    agents queue: gemstash-publish is preserved verbatim as a label)

Rollback: revert this PR. Gemstash continues to serve while it is
sunset, so reads remain working pre- and post-revert.
…mpose version

Inside docker-compose's runner container WORKDIR=/var/www; bare 'test.sh'
isn't on PATH so the command lookup failed with 'test.sh: not found' (exit
127). Prefix with './' to invoke as an executable in the cwd. Same for
typecheck.sh.

Also drop 'version: "3"' from docker-compose.yml — Compose v2 warns the
attribute is obsolete.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant