Skip to content

Create new pipeline for releasing to rubygems#237

Merged
pda merged 1 commit intomainfrom
release-pipeline
Feb 4, 2025
Merged

Create new pipeline for releasing to rubygems#237
pda merged 1 commit intomainfrom
release-pipeline

Conversation

@yob
Copy link
Contributor

@yob yob commented Feb 4, 2025

This adds a new pipeline.yml specifically for pushing gem releases to rubygems.org. We use the rubygems-oidc plugin to swap a Buildkite OIDC token for a temporary rubygems.org token that has permission to push this gem - that exchange process will only work from a special Buildkite pipeline that is triggered by a tag push to the repository.

I've updated the README with the new process. It's largely the same, except now any staff member with access to the release pipeline can approve the release. They no longer need to be added as an owner on the gem, or need to have access to any shared credentials for our rubygems.org user.

@yob yob requested a review from a team as a code owner February 4, 2025 06:06

# Skip while testing
# gem push "${GEM_FILENAME}"
echo "pretend push ${GEM_FILENAME}"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this has been reviewed and before it merges, we should change this to plain gem push .... . I had it like this for testing

@yob
Copy link
Contributor Author

yob commented Feb 4, 2025

I'm not thrilled with the amount of bespoke bash I had to right for this. It'd be nice to ... not have it. Maybe later we can extract the pattern into a "rubygems-release" plugin that pairs well with the "rubygems-oidc" plugin or something....


- command: ".buildkite/steps/release-gem"
label: ":rubygems:"
if: build.tag != null
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yob yob force-pushed the release-pipeline branch from 5c813b7 to 38d5b73 Compare February 4, 2025 06:26
This adds a new pipeline.yml specifically for pushing gem releases to
rubygems.org. We use the `rubygems-oidc` plugin to swap a Buildkite OIDC
token for a temporary rubygems.org token that has permission to push
this gem - that exchange process will only work from a special Buildkite
pipeline that is triggered by a tag push to the repository.

I've updated the README with the new process. It's largely the same,
except now any staff member with access to the release pipeline can
approve the release. They no longer need to be added as an owner on the
gem [1], or need to have access to any shared credentials for our
rubygems.org user.

[1] https://rubygems.org/gems/buildkite-test_collector
@pda pda force-pushed the release-pipeline branch from 38d5b73 to 4d2385a Compare February 4, 2025 06:28
@pda pda merged commit 57c90c0 into main Feb 4, 2025
1 check passed
@pda pda deleted the release-pipeline branch February 4, 2025 06:32
@pda pda mentioned this pull request Feb 4, 2025
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.

2 participants