-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This moves from Travis to GitHub Actions based test and deploy workflow. Notably, this uses standard script conventions used by other projects in OpenZipkin. The main change to the actual code here is reverting version.rb to 0.0.0 like some other Ruby projects are doing, instead of updating it manually in git each time. Co-authored-by: Anuraag Agrawal <[email protected]>
- Loading branch information
1 parent
2faafd0
commit 78afbc0
Showing
20 changed files
with
504 additions
and
43 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Contributing to Zipkin | ||
|
||
If you would like to contribute code, fork this GitHub repository and | ||
send a pull request (on a branch other than `master` or `gh-pages`). | ||
|
||
## License | ||
|
||
By contributing your code, you agree to license your contribution under | ||
the terms of the [APLv2](../LICENSE). | ||
|
||
All files are copyright "The OpenZipkin Authors" and released with the Apache 2.0 license. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
name: Bug | ||
about: If you’ve found a bug, spend the time to write a failing test. Bugs with tests get fixed and stay fixed. If you have a solution in mind, skip raising an issue and open a pull request instead. | ||
labels: bug | ||
--- | ||
## Describe the Bug | ||
A clear and concise description of what the bug is. If you have a solution in mind, skip raising an issue and open a pull request instead. | ||
|
||
Regardless, the best is to spend some time to write a failing test. Bugs with tests get fixed and stay fixed. | ||
|
||
## Steps to Reproduce | ||
Steps to reproduce the behavior: | ||
|
||
## Expected Behaviour | ||
Suggest what you think correct behaviour should be. Note, it may be solved differently depending on the problem. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Question | ||
url: https://gitter.im/openzipkin/zipkin | ||
about: Please ask questions about how to do something or to understand why something isn't working on our Gitter chat - we'll be happy to respond there in detail. This issue tracker is not for questions. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
name: Feature Request | ||
about: Please first, look at existing issues to see if the feature has been requested before. | ||
labels: enhancement | ||
--- | ||
Please first, look at [existing issues](https://github.com/openzipkin/zipkin-ruby/issues) to see if the feature has been requested before. If you don't find anything tell us what problem you’re trying to solve. Often a solution already exists! Don’t send pull requests to implement new features without first getting our support. Sometimes we leave features out on purpose to keep the project small. | ||
|
||
## Feature | ||
Description of the feature | ||
|
||
## Rationale | ||
Why would this feature help others besides me? | ||
|
||
## Example Scenario | ||
What kind of use cases would benefit from this feature? | ||
|
||
## Prior Art | ||
* Links to prior art | ||
* More links |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# yamllint --format github .github/workflows/deploy.yml | ||
--- | ||
name: deploy | ||
|
||
# We deploy on a release versions, regardless of if the commit is documentation-only or not. | ||
# | ||
# See https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet | ||
on: | ||
push: | ||
tags: '[0-9]+.[0-9]+.[0-9]+**' # Ex. 1.2.3 | ||
branches: master | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-20.04 # newest available distribution, aka focal | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 # full history is not needed | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7 | ||
bundler-cache: true | ||
- name: Deploy | ||
env: | ||
# RUBYGEMS_API_KEY=<hex token value> | ||
# - needs to own the gem | ||
# - generated at https://rubygems.org/settings/edit | ||
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} | ||
run: | # GITHUB_REF will be refs/tags/MAJOR.MINOR.PATCH | ||
build-bin/configure_deploy && | ||
build-bin/deploy $(echo ${GITHUB_REF} | cut -d/ -f 3) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# yamllint --format github .github/workflows/test.yml | ||
--- | ||
name: test | ||
|
||
# We don't test documentation-only commits. | ||
on: | ||
# We run tests on non-tagged pushes to master | ||
push: | ||
tags: '' | ||
branches: master | ||
paths-ignore: '**/*.md' | ||
# We also run tests on pull requests targeted at the master branch. | ||
pull_request: | ||
branches: master | ||
paths-ignore: '**/*.md' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 # newest available distribution, aka focal | ||
strategy: | ||
fail-fast: false | ||
matrix: # https://github.com/ruby/setup-ruby/blob/master/README.md#supported-versions | ||
ruby: [2.3, 2.4, 2.5, 2.6, 2.7, jruby-9.1, jruby-9.2] | ||
gemfile: | ||
- gemfiles/faraday_0.x.gemfile | ||
- gemfiles/faraday_1.x.gemfile | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 # full history is not needed | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- name: Test | ||
run: build-bin/configure_test && build-bin/test | ||
env: | ||
BUNDLE_GEMFILE: ${{ matrix.gemfile }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,3 +33,7 @@ | |
Gemfile.lock | ||
|
||
.byebug_history | ||
|
||
# IntelliJ | ||
.idea | ||
*.iml |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,44 @@ | ||
## Release Process | ||
# OpenZipkin Release Process | ||
|
||
* tag the commit `git tag -v0.0.0` | ||
* push tags to origin `git push origin --tags` | ||
* Travis will automatically build and push to rubygems | ||
* TODO: have travis push the tag using info from version.rb | ||
This repo uses semantic versions. Please keep this in mind when choosing version numbers. | ||
|
||
1. **Alert others you are releasing** | ||
|
||
There should be no commits made to master while the release is in progress (about 10 minutes). Before you start | ||
a release, alert others on [gitter](https://gitter.im/openzipkin/zipkin) so that they don't accidentally merge | ||
anything. If they do, and the build fails because of that, you'll have to recreate the release tag described below. | ||
|
||
1. **Push a git tag** | ||
|
||
The tag should formatted `MAJOR.MINOR.PATCH`, ex `git tag 1.18.1 && git push origin 1.18.1`. | ||
|
||
1. **Wait for CI** | ||
|
||
The `MAJOR.MINOR.PATCH` tag triggers [`build-bin/deploy`](build-bin/deploy), which does the following: | ||
* https://rubygems.org/gems/zipkin-tracer [`build-bin/gem/gem_push`](build-bin/gem/gem_push) | ||
|
||
## Credentials | ||
|
||
The release process uses various credentials. If you notice something failing due to unauthorized, | ||
look at the notes in [.github/workflows/deploy.yml] and check the [org secrets](https://github.com/organizations/openzipkin/settings/secrets/actions). | ||
|
||
## Manually releasing | ||
|
||
If for some reason, you lost access to CI or otherwise cannot get automation to work, bear in mind | ||
this is a normal ruby project, and can be released accordingly. | ||
|
||
```bash | ||
# First, set variable according to your personal credentials. These would normally be assigned as | ||
# org secrets: https://github.com/organizations/openzipkin/settings/secrets/actions | ||
export RUBYGEMS_API_KEY=your_api_key | ||
release_version=xx-version-to-release-xx | ||
|
||
# now from latest master, create the MAJOR.MINOR.PATCH tag | ||
git tag ${release_version} | ||
|
||
# Run the deploy using the version you added as a tag | ||
./build-bin/deploy ${release_version} | ||
|
||
# Finally, push the tag | ||
git push origin ${release_version} | ||
``` |
Oops, something went wrong.