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

Create an initial release job #138

Merged
merged 2 commits into from
Nov 2, 2019
Merged

Conversation

dazuma
Copy link
Member

@dazuma dazuma commented Nov 1, 2019

Implementation of #94.

Implements scripts that build and push releases of the API and SDK to Rubygems, and augments the CI config to trigger them.

The proposed release process is as follows. To release a gem:

  1. The version constant must be set to the version to be released.
  2. A tag called #{gem_name}/v#{version} must be created and pushed to Github. (e.g. opentelemetry-api/v1.2.3). Thus, anyone with direct write access to the repo will be able to initiate a release.

When the tag is created in Github, CircleCI will automatically (after running that gem's tests one final time) run the release script. This script:

  1. Verifies that the tag's version matches the gem's version constant
  2. Builds the gem and pushes to Rubygems.

The release script requires the following environment variable configuration to be set on the CircleCI project (currently not yet done):

  • The OPENTELEMETRY_RUBYGEMS_API_KEY environment variable must be set with credentials for the Rubygems account we want to use to push the gem. Rubygems credentials will be held by the CI; individuals will not need direct access to them.
  • The OPENTELEMETRY_RELEASES_ENABLED environment variable should be set to the value true. (If it is not, the release script will run in test mode, and will go through the motions of building and verifying the gem, but will not actually push it to Rubygems.)

Current limitations, which I can address once we've agreed on the basic approach:

  • The Jaeger exporter is not yet covered. (Actually it's not yet covered by the CI at all. I can add it.)
  • The release script probably could check up front whether the proposed version has already been released, and fail fast with a more useful error message. As it is, I believe it will only fail at the end when the gem push is attempted.
  • The script is not enforcing any CHANGELOG updates. Indeed, we don't even have a changelog at all yet. At some point in the future, I think it might make sense to adopt conventional commits and have the release script automatically populate the changelog based on commit messages.

Copy link
Member

@mwear mwear left a comment

Choose a reason for hiding this comment

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

This looks great @dazuma. We should definitely get the Jaeger exporter added to this and CI (at some point). I think we can make incremental changes from here and I like your suggestions for future improvements.

@mwear mwear merged commit 98bc7c8 into open-telemetry:master Nov 2, 2019
@dazuma dazuma deleted the releases branch November 3, 2019 00:01
@mwear mwear mentioned this pull request Jul 2, 2020
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