(maint) Authenticate to puppetcore in gem release workflows#181
Merged
Conversation
gem_release_prep.yml and gem_release.yml run `bundle install` (via setup-ruby with bundler-cache) but never set the puppetcore credential, unlike gem_ci.yml. Once a consuming gem's Gemfile adds the authenticated `rubygems-puppetcore.puppet.com` source (Ruby 4 / Puppet 9 migration), `bundle lock` fails with "Authentication is required for rubygems-puppetcore.puppet.com" / exit code 17 during release prep and release. Add the same workflow-level env that gem_ci.yml uses so the bundler install authenticates from the inherited PUPPET_FORGE_TOKEN secret. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gem_release_prep.yml and gem_release.yml run `bundle install` (via setup-ruby with bundler-cache) but never set the puppetcore credential, unlike gem_ci.yml. Once a consuming gem's Gemfile adds the authenticated `rubygems-puppetcore.puppet.com` source (Ruby 4 / Puppet 9 migration), `bundle lock` fails with "Authentication is required for rubygems-puppetcore.puppet.com" / exit code 17 during release prep and release. Add the same workflow-level env that gem_ci.yml uses so the bundler install authenticates from the inherited PUPPET_FORGE_TOKEN secret. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
david22swan
approved these changes
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
gem_release_prep.ymlandgem_release.ymlrunbundle install(viaruby/setup-ruby@v1withbundler-cache: true) but, unlikegem_ci.yml, never set the puppetcore credential.As consuming gems adopt the Ruby 4 / Puppet 9 migration — which adds the authenticated
rubygems-puppetcore.puppet.comsource to theirGemfile— release prep and release start failing at thesetup rubystep:First hit by
puppet_litmus: its CAT-2588 PR (puppetcore source) merged tomainon 2026-06-16, after the last release; the next Release Prep run then failed.gem_ci.ymlis unaffected because it already exports the token. This will affect every puppetlabs gem repo as it picks up the puppetcore Gemfile change.Fix
Add the same workflow-level
env:thatgem_ci.ymlalready uses to both release workflows, so the bundler install authenticates from the inheritedPUPPET_FORGE_TOKENsecret:Callers already pass
secrets: inherit, so no downstream change is required. Repos whose Gemfile doesn't use the puppetcore source are unaffected (the var is simply unused).Notes
gem_ci.yml/CLAUDE.md.