Repository navigation
Pass the Sidekiq Pro login to the build as a BuildKit secret - #2059
Merged
Merged
Conversation
build.sh passed SIDEKIQ_CREDS as a build arg, and the Dockerfile saved it with bundle config --global. That put the gem server login in the image history and in /root/.bundle/config in a layer. Now build.sh hands it over with --secret, and only the bundle install RUN mounts it, as BUNDLE_GEMS__CONTRIBSYS__COM. The same RUN removes /root/.bundle, because Bundler names its index cache folder there after the source URL, username included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
@JasonBennett41 @frett Friendly nudge on this one too. It's green after the master update, and it's the same Sidekiq login change that's already live on fl-pos-admin and staff-conf-onsite. Thanks! |
frett
approved these changes
Nov 17, 2026
frett
left a comment
Contributor
There was a problem hiding this comment.
@cru-Luis-Rodriguez I'll approve it, but I no longer work on godtools
cru-Luis-Rodriguez
added a commit
that referenced
this pull request
Nov 17, 2026
cru-Luis-Rodriguez
added a commit
that referenced
this pull request
Nov 17, 2026
Resolve the Dockerfile conflict with #2059: keep its BuildKit secret mount and /root/.bundle removal, then run the gem cleanup in the same RUN.
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.
Why
The Sidekiq Pro login (
SIDEKIQ_CREDS) reaches the image as a build arg, andbundle config --globalthen writes it to/root/.bundle/config. That leaves it in an image layer and in the image history. This PR passes it as a BuildKit secret instead, as we agreed with the Apps team. It's the same change as CruGlobal/fl-pos-admin#118.What changes
build.shpasses the login with--secret id=sidekiq_creds,env=SIDEKIQ_CREDSinstead of--build-arg.bundle installRUN mounts that secret asBUNDLE_GEMS__CONTRIBSYS__COM, the variable Bundler reads for gems.contribsys.com. It only exists while that RUN runs.ARG SIDEKIQ_CREDSand thebundle config --globalline are gone./root/.bundle. Bundler names its index cache folder there after the source URL, and that name includes the gem server username. Gems install to/usr/local/bundle, so nothing later needs that folder.What was checked
staging-11387). Bundler fetched and installed sidekiq-pro 8.0.3 with the login from the secret.production-11386) has 4.Notes
.envkeeps its emptySIDEKIQ_CREDS=placeholder. dotenv only loads it in dev and test, and nothing reads that variable.stagingstill has the old Dockerfile, so staging builds keep the build arg until this reaches it. After review, the On Staging label has merge-bot merge it there and build stage.masterbuilds and deploys production. Rollback is redeployingproduction-11386.masterhas built with this change, I'll clear theLinux-buildx-*Actions caches so the next builds start clean.@frett, this is the mobile-content-api PR from the SIDEKIQ_CREDS thread. Could you or someone on the GodTools team run the agent-review on it when you have a minute?
🤖 Generated with Claude Code