Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add release steps to the buildkite pipeline #544

Merged
merged 1 commit into from
Jan 29, 2025
Merged

Add release steps to the buildkite pipeline #544

merged 1 commit into from
Jan 29, 2025

Conversation

yob
Copy link
Owner

@yob yob commented Jan 7, 2025

Noodling on some additional CI steps that will publish to rubygems.org from CI using OIDC, rather than me doing it manually from my laptop.

Partly blocked on rubygems/rubygems.org#5376, which I was able to work around but it makes the setup on rubygems.org difficult.

Hard blocked on rubygems/rubygems.org#5296 (comment), because rubygems.org recently started requiring OIDC tokens to have a jti claim and Buildkite doesn't include it (yet?).

I also switched the pipeline.yml to DAG mode, because it's better.

I'm not using https://github.com/buildkite-plugins/rubygems-oidc-buildkite-plugin/ because it requires ruby in the CI env and I don't have it (and don't want to jump through hoops to install it) I'm now using it, with a branch that converts the plugin to bash

auto/release-gem Outdated
# gem build pdf-reader.gemspec
# GEM_HOST_API_KEY="${GEM_HOST_API_KEY}" gem push "pdf-reader-${RELEASE_VERSION}.gem"

docker run -it -v "${PWD}:/work" -w /work -e GEM_HOST_API_KEY="${GEM_HOST_API_KEY}" ruby:3.4-slim bash -c "gem build pdf-reader.gemspec && gem push \"pdf-reader-${RELEASE_VERSION}.gem\""
Copy link
Owner Author

Choose a reason for hiding this comment

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

I think we could go back to using the gem available in ubuntu's repositories, this was just be testing to see if the newer rubygems version helped.

- specs-legacy
- specs-jruby
- specs-jruby-soft
#branch: main
Copy link
Owner Author

Choose a reason for hiding this comment

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

uncomment this before merging

auto/release-gem Outdated

echo "--- Request rubygems token"

RUBYGEMS_ROLE="rg_oidc_akr_xoy8sqmj25t8ok4rn5sq"
Copy link
Owner Author

Choose a reason for hiding this comment

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

looks secret, but not actually that secret

@yob yob force-pushed the release-gem branch 2 times, most recently from b64af5d to 1b631b5 Compare January 7, 2025 09:48
@yob yob force-pushed the release-gem branch 7 times, most recently from b13dcb1 to f6b3db7 Compare January 29, 2025 02:51
Aiming to release new gems from CI rather than manually

* use plugin to fetch rubygems token via OIDC
@yob
Copy link
Owner Author

yob commented Jan 29, 2025

Success! The blockers were sorted out, and v2.14.0 was successfully pushed from this branch: https://buildkite.com/yob-opensource/pdf-reader/builds/694/canvas

I'll change the release steps to be main only, then merge this

@yob yob marked this pull request as ready for review January 29, 2025 02:53
@yob yob merged commit 29b9c2e into main Jan 29, 2025
1 check passed
@yob yob deleted the release-gem branch January 29, 2025 02:55
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