zipkin-tracer 0.47.2 → 0.47.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/CONTRIBUTING.md +11 -0
- data/.github/ISSUE_TEMPLATE/bug.md +15 -0
- data/.github/ISSUE_TEMPLATE/config.yml +5 -0
- data/.github/ISSUE_TEMPLATE/feature.md +19 -0
- data/.github/workflows/deploy.yml +34 -0
- data/.github/workflows/test.yml +40 -0
- data/.gitignore +4 -0
- data/CHANGELOG.md +3 -0
- data/README.md +3 -1
- data/RELEASE.md +43 -5
- data/build-bin/README.md +203 -0
- data/build-bin/configure_deploy +9 -0
- data/build-bin/configure_test +9 -0
- data/build-bin/deploy +11 -0
- data/build-bin/gem/bundle_install +20 -0
- data/build-bin/gem/configure_gem_credentials +26 -0
- data/build-bin/gem/gem_push +39 -0
- data/build-bin/test +8 -0
- data/lib/zipkin-tracer/version.rb +1 -1
- metadata +17 -4
- data/.travis.yml +0 -36
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 853e0ae1f408f68a420193b5deb379ab1acbd697b75f98bfbd9115071eb62902
|
|
4
|
+
data.tar.gz: 960b5be09c3c54a38ea23596a6e085a4d5beb9908ab2309c36027dbc6fe3933a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9b11d82d1c20be368f1b0ec44c98d53648f9bba071880b65e4a37f455d529014d693a0a8808cb46e4aa661375b40ecc9725aa267f177a322297d6f74be0166a8
|
|
7
|
+
data.tar.gz: 3a9650a7b7a9e926af207c1064f5e45206545c879f8b00625d83dc020e82dbc388e5574dea1974697cd46a301e78730198d660095b862e01e539300a18c5556c
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Contributing to Zipkin
|
|
2
|
+
|
|
3
|
+
If you would like to contribute code, fork this GitHub repository and
|
|
4
|
+
send a pull request (on a branch other than `master` or `gh-pages`).
|
|
5
|
+
|
|
6
|
+
## License
|
|
7
|
+
|
|
8
|
+
By contributing your code, you agree to license your contribution under
|
|
9
|
+
the terms of the [APLv2](../LICENSE).
|
|
10
|
+
|
|
11
|
+
All files are copyright "The OpenZipkin Authors" and released with the Apache 2.0 license.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug
|
|
3
|
+
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.
|
|
4
|
+
labels: bug
|
|
5
|
+
---
|
|
6
|
+
## Describe the Bug
|
|
7
|
+
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.
|
|
8
|
+
|
|
9
|
+
Regardless, the best is to spend some time to write a failing test. Bugs with tests get fixed and stay fixed.
|
|
10
|
+
|
|
11
|
+
## Steps to Reproduce
|
|
12
|
+
Steps to reproduce the behavior:
|
|
13
|
+
|
|
14
|
+
## Expected Behaviour
|
|
15
|
+
Suggest what you think correct behaviour should be. Note, it may be solved differently depending on the problem.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Question
|
|
4
|
+
url: https://gitter.im/openzipkin/zipkin
|
|
5
|
+
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.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature Request
|
|
3
|
+
about: Please first, look at existing issues to see if the feature has been requested before.
|
|
4
|
+
labels: enhancement
|
|
5
|
+
---
|
|
6
|
+
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.
|
|
7
|
+
|
|
8
|
+
## Feature
|
|
9
|
+
Description of the feature
|
|
10
|
+
|
|
11
|
+
## Rationale
|
|
12
|
+
Why would this feature help others besides me?
|
|
13
|
+
|
|
14
|
+
## Example Scenario
|
|
15
|
+
What kind of use cases would benefit from this feature?
|
|
16
|
+
|
|
17
|
+
## Prior Art
|
|
18
|
+
* Links to prior art
|
|
19
|
+
* More links
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# yamllint --format github .github/workflows/deploy.yml
|
|
2
|
+
---
|
|
3
|
+
name: deploy
|
|
4
|
+
|
|
5
|
+
# We deploy on a release versions, regardless of if the commit is documentation-only or not.
|
|
6
|
+
#
|
|
7
|
+
# See https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
|
|
8
|
+
on:
|
|
9
|
+
push:
|
|
10
|
+
tags: '[0-9]+.[0-9]+.[0-9]+**' # Ex. 1.2.3
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
deploy:
|
|
14
|
+
runs-on: ubuntu-20.04 # newest available distribution, aka focal
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout Repository
|
|
17
|
+
uses: actions/checkout@v2
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 1 # full history is not needed
|
|
20
|
+
- name: Set up Ruby
|
|
21
|
+
uses: ruby/setup-ruby@v1
|
|
22
|
+
with:
|
|
23
|
+
ruby-version: 2.7
|
|
24
|
+
bundler-cache: true
|
|
25
|
+
- name: Deploy
|
|
26
|
+
env:
|
|
27
|
+
# RUBYGEMS_API_KEY=<hex token value>
|
|
28
|
+
# - needs to own the gem
|
|
29
|
+
# - generated at https://rubygems.org/settings/edit
|
|
30
|
+
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|
|
31
|
+
BUNDLE_GEMFILE: gemfiles/faraday_1.x.gemfile
|
|
32
|
+
run: | # GITHUB_REF will be refs/tags/MAJOR.MINOR.PATCH
|
|
33
|
+
build-bin/configure_deploy &&
|
|
34
|
+
build-bin/deploy $(echo ${GITHUB_REF} | cut -d/ -f 3)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# yamllint --format github .github/workflows/test.yml
|
|
2
|
+
---
|
|
3
|
+
name: test
|
|
4
|
+
|
|
5
|
+
# We don't test documentation-only commits.
|
|
6
|
+
on:
|
|
7
|
+
# We run tests on non-tagged pushes to master
|
|
8
|
+
push:
|
|
9
|
+
tags: ''
|
|
10
|
+
branches: master
|
|
11
|
+
paths-ignore: '**/*.md'
|
|
12
|
+
# We also run tests on pull requests targeted at the master branch.
|
|
13
|
+
pull_request:
|
|
14
|
+
branches: master
|
|
15
|
+
paths-ignore: '**/*.md'
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
test:
|
|
19
|
+
runs-on: ubuntu-20.04 # newest available distribution, aka focal
|
|
20
|
+
strategy:
|
|
21
|
+
fail-fast: false
|
|
22
|
+
matrix: # https://github.com/ruby/setup-ruby/blob/master/README.md#supported-versions
|
|
23
|
+
ruby: [2.3, 2.4, 2.5, 2.6, 2.7, jruby-9.1, jruby-9.2]
|
|
24
|
+
gemfile:
|
|
25
|
+
- gemfiles/faraday_0.x.gemfile
|
|
26
|
+
- gemfiles/faraday_1.x.gemfile
|
|
27
|
+
steps:
|
|
28
|
+
- name: Checkout Repository
|
|
29
|
+
uses: actions/checkout@v2
|
|
30
|
+
with:
|
|
31
|
+
fetch-depth: 1 # full history is not needed
|
|
32
|
+
- name: Set up Ruby
|
|
33
|
+
uses: ruby/setup-ruby@v1
|
|
34
|
+
with:
|
|
35
|
+
ruby-version: ${{ matrix.ruby }}
|
|
36
|
+
bundler-cache: true
|
|
37
|
+
- name: Test
|
|
38
|
+
run: build-bin/configure_test && build-bin/test
|
|
39
|
+
env:
|
|
40
|
+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# ZipkinTracer: Zipkin client for Ruby
|
|
2
2
|
|
|
3
|
-
[](https://gitter.im/openzipkin/zipkin)
|
|
4
|
+
[](https://github.com/openzipkin/zipkin-ruby/actions?query=workflow%3Atest)
|
|
5
|
+
[](https://badge.fury.io/rb/zipkin-tracer)
|
|
4
6
|
|
|
5
7
|
Rack and Faraday integration middlewares for Zipkin tracing.
|
|
6
8
|
|
data/RELEASE.md
CHANGED
|
@@ -1,6 +1,44 @@
|
|
|
1
|
-
|
|
1
|
+
# OpenZipkin Release Process
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
This repo uses semantic versions. Please keep this in mind when choosing version numbers.
|
|
4
|
+
|
|
5
|
+
1. **Alert others you are releasing**
|
|
6
|
+
|
|
7
|
+
There should be no commits made to master while the release is in progress (about 10 minutes). Before you start
|
|
8
|
+
a release, alert others on [gitter](https://gitter.im/openzipkin/zipkin) so that they don't accidentally merge
|
|
9
|
+
anything. If they do, and the build fails because of that, you'll have to recreate the release tag described below.
|
|
10
|
+
|
|
11
|
+
1. **Push a git tag**
|
|
12
|
+
|
|
13
|
+
The tag should formatted `MAJOR.MINOR.PATCH`, ex `git tag 1.18.1 && git push origin 1.18.1`.
|
|
14
|
+
|
|
15
|
+
1. **Wait for CI**
|
|
16
|
+
|
|
17
|
+
The `MAJOR.MINOR.PATCH` tag triggers [`build-bin/deploy`](build-bin/deploy), which does the following:
|
|
18
|
+
* https://rubygems.org/gems/zipkin-tracer [`build-bin/gem/gem_push`](build-bin/gem/gem_push)
|
|
19
|
+
|
|
20
|
+
## Credentials
|
|
21
|
+
|
|
22
|
+
The release process uses various credentials. If you notice something failing due to unauthorized,
|
|
23
|
+
look at the notes in [.github/workflows/deploy.yml] and check the [org secrets](https://github.com/organizations/openzipkin/settings/secrets/actions).
|
|
24
|
+
|
|
25
|
+
## Manually releasing
|
|
26
|
+
|
|
27
|
+
If for some reason, you lost access to CI or otherwise cannot get automation to work, bear in mind
|
|
28
|
+
this is a normal ruby project, and can be released accordingly.
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# First, set variable according to your personal credentials. These would normally be assigned as
|
|
32
|
+
# org secrets: https://github.com/organizations/openzipkin/settings/secrets/actions
|
|
33
|
+
export RUBYGEMS_API_KEY=your_api_key
|
|
34
|
+
release_version=xx-version-to-release-xx
|
|
35
|
+
|
|
36
|
+
# now from latest master, create the MAJOR.MINOR.PATCH tag
|
|
37
|
+
git tag ${release_version}
|
|
38
|
+
|
|
39
|
+
# Run the deploy using the version you added as a tag
|
|
40
|
+
./build-bin/deploy ${release_version}
|
|
41
|
+
|
|
42
|
+
# Finally, push the tag
|
|
43
|
+
git push origin ${release_version}
|
|
44
|
+
```
|
data/build-bin/README.md
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# Test and Deploy scripts
|
|
2
|
+
|
|
3
|
+
This is a Ruby project, which uses standard conventions for test and deploy.
|
|
4
|
+
|
|
5
|
+
Test is normal, except there's a matrix in [CI setup](../.github/workflows/test.yml).
|
|
6
|
+
|
|
7
|
+
To create a release, push a MAJOR.MINOR.PATCH tag (ex `0.47.2`). Below are details about the deployment process.
|
|
8
|
+
|
|
9
|
+
Notably, the [gem version](../lib/zipkin-tracer/version.rb) is lazy set, defaulting to `0.0.0`. When
|
|
10
|
+
a release MAJOR.MINOR.PATCH tag (ex `0.47.2`) is pushed, this file is overwritten as a side effect of running
|
|
11
|
+
[deploy]. The release version is not written into git history except as a part of [../CHANGELOG.md].
|
|
12
|
+
|
|
13
|
+
[//]: # (Below here should be standard for all projects)
|
|
14
|
+
|
|
15
|
+
## Build Overview
|
|
16
|
+
`build-bin` holds portable scripts used in CI to test and deploy the project.
|
|
17
|
+
|
|
18
|
+
The scripts here are portable. They do not include any CI provider-specific logic or ENV variables.
|
|
19
|
+
This helps `.travis.yml` and `test.yml` (GitHub Actions) contain nearly the same contents, even if
|
|
20
|
+
certain OpenZipkin projects need slight adjustments here. Portability has proven necessary, as
|
|
21
|
+
OpenZipkin has had to transition CI providers many times due to feature and quota constraints.
|
|
22
|
+
|
|
23
|
+
These scripts serve a second purpose, which is to facilitate manual releases, which has also
|
|
24
|
+
happened many times due usually to service outages of CI providers. While tempting to use
|
|
25
|
+
CI-provider specific tools, doing so can easily create a dependency where no one knows how to
|
|
26
|
+
release anymore. Do not use provider-specific mechanisms to implement release flow. Instead,
|
|
27
|
+
automate triggering of the scripts here.
|
|
28
|
+
|
|
29
|
+
The only scripts that should be modified per project are in the base directory. Those in sub
|
|
30
|
+
directories, such as [docker], should not vary project to project except accident of version drift.
|
|
31
|
+
Intentional changes in sub directories should be relevant and tested on multiple projects to ensure
|
|
32
|
+
they can be blindly copy/pasted.
|
|
33
|
+
|
|
34
|
+
Conversely, the files in the base directory are project specific entry-points for test and deploy
|
|
35
|
+
actions and are entirely appropriate to vary per project. Here's an overview:
|
|
36
|
+
|
|
37
|
+
## Test
|
|
38
|
+
|
|
39
|
+
Test builds and runs any tests of the project, including integration tests. CI providers should be
|
|
40
|
+
configured to run tests on pull requests or pushes to the master branch, notably when the tag is
|
|
41
|
+
blank. Tests should not run on documentation-only commits. Tests must not depend on authenticated
|
|
42
|
+
resources, as running tests can leak credentials. Git checkouts should include the full history so
|
|
43
|
+
that license headers or other git analysis can take place.
|
|
44
|
+
|
|
45
|
+
* [configure_test] - Sets up build environment for tests.
|
|
46
|
+
* [test] - Builds and runs tests for this project.
|
|
47
|
+
|
|
48
|
+
### Example GitHub Actions setup
|
|
49
|
+
|
|
50
|
+
A simplest GitHub Actions `test.yml` runs tests after configuring them, but only on relevant event
|
|
51
|
+
conditions. The name `test.yml` and job `test` allows easy references to status badges and parity of
|
|
52
|
+
the scripts it uses.
|
|
53
|
+
|
|
54
|
+
The `on:` section obviates job creation and resource usage for irrelevant events. Notably, GitHub
|
|
55
|
+
Actions includes the ability to skip documentation-only jobs.
|
|
56
|
+
|
|
57
|
+
Combine [configure_test] and [test] into the same `run:` when `configure_test` primes file system
|
|
58
|
+
cache.
|
|
59
|
+
|
|
60
|
+
Here's a partial `test.yml` including only the aspects mentioned above.
|
|
61
|
+
```yaml
|
|
62
|
+
on:
|
|
63
|
+
push:
|
|
64
|
+
tags: ''
|
|
65
|
+
branches: master
|
|
66
|
+
paths-ignore: '**/*.md'
|
|
67
|
+
pull_request:
|
|
68
|
+
branches: master
|
|
69
|
+
paths-ignore: '**/*.md'
|
|
70
|
+
|
|
71
|
+
jobs:
|
|
72
|
+
test:
|
|
73
|
+
steps:
|
|
74
|
+
- name: Checkout Repository
|
|
75
|
+
uses: actions/checkout@v2
|
|
76
|
+
with:
|
|
77
|
+
fetch-depth: 0 # full git history
|
|
78
|
+
- name: Test
|
|
79
|
+
run: build-bin/configure_test && build-bin/test
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Example Travis setup
|
|
83
|
+
`.travis.yml` is a monolithic configuration file broken into stages, of which the default is "test".
|
|
84
|
+
A simplest Travis `test` job configures tests in `install` and runs them as `script`, but only on
|
|
85
|
+
relevant event conditions.
|
|
86
|
+
|
|
87
|
+
The `if:` section obviates job creation and resource usage for irrelevant events. Travis does not
|
|
88
|
+
support file conditions. A `before_install` step to skip documentation-only commits will likely
|
|
89
|
+
complete in less than a minute (10 credit cost).
|
|
90
|
+
|
|
91
|
+
Here's a partial `.travis.yml` including only the aspects mentioned above.
|
|
92
|
+
```yaml
|
|
93
|
+
git:
|
|
94
|
+
depth: false # full git history for license check, and doc-only skipping
|
|
95
|
+
|
|
96
|
+
jobs:
|
|
97
|
+
include:
|
|
98
|
+
- stage: test
|
|
99
|
+
if: branch = master AND tag IS blank AND type IN (push, pull_request)
|
|
100
|
+
name: Run unit and integration tests
|
|
101
|
+
before_install: |
|
|
102
|
+
if [ -n "${TRAVIS_COMMIT_RANGE}" ] && ! git diff --name-only "${TRAVIS_COMMIT_RANGE}" -- | grep -qv '\.md$'; then
|
|
103
|
+
echo "Stopping job as changes only affect documentation (ex. README.md)"
|
|
104
|
+
travis_terminate 0
|
|
105
|
+
fi
|
|
106
|
+
install: ./build-bin/configure_test
|
|
107
|
+
script: ./build-bin/test
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Deploy
|
|
111
|
+
|
|
112
|
+
Deploy builds and pushes artifacts to a remote repository for master and release commits on it. CI
|
|
113
|
+
providers deploy pushes to master on when the tag is blank, but not on documentation-only commits.
|
|
114
|
+
Releases should deploy on version tags (ex `/^[0-9]+\.[0-9]+\.[0-9]+/`), without consideration of if
|
|
115
|
+
the commit is documentation only or not.
|
|
116
|
+
|
|
117
|
+
* [configure_deploy] - Sets up environment and logs in, assuming [configure_test] was not called.
|
|
118
|
+
* [deploy] - deploys the project, with arg0 being "master" or a release commit like "1.2.3"
|
|
119
|
+
|
|
120
|
+
### Example GitHub Actions setup
|
|
121
|
+
|
|
122
|
+
A simplest GitHub Actions `deploy.yml` deploys after logging in, but only on relevant event
|
|
123
|
+
conditions. The name `deploy.yml` and job `deploy` allows easy references to status badges and
|
|
124
|
+
parity of the scripts it uses.
|
|
125
|
+
|
|
126
|
+
The `on:` section obviates job creation and resource usage for irrelevant events. GitHub Actions
|
|
127
|
+
cannot implement "master, except documentation only-commits" in the same file. Hence, deployments of
|
|
128
|
+
master will happen even on README change.
|
|
129
|
+
|
|
130
|
+
Combine [configure_deploy] and [deploy] into the same `run:` when `configure_deploy` primes file
|
|
131
|
+
system cache.
|
|
132
|
+
|
|
133
|
+
Here's a partial `deploy.yml` including only the aspects mentioned above. Notice env variables are
|
|
134
|
+
explicitly defined and `on.tags` is a [glob pattern](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet).
|
|
135
|
+
```yaml
|
|
136
|
+
on:
|
|
137
|
+
push:
|
|
138
|
+
tags: '[0-9]+.[0-9]+.[0-9]+**' # Ex. 8.272.10 or 15.0.1_p9
|
|
139
|
+
branches: master
|
|
140
|
+
|
|
141
|
+
jobs:
|
|
142
|
+
deploy:
|
|
143
|
+
steps:
|
|
144
|
+
- name: Checkout Repository
|
|
145
|
+
uses: actions/checkout@v2
|
|
146
|
+
with:
|
|
147
|
+
fetch-depth: 1 # only needed to get the sha label
|
|
148
|
+
- name: Deploy
|
|
149
|
+
env:
|
|
150
|
+
GH_USER: ${{ secrets.GH_USER }}
|
|
151
|
+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
152
|
+
run: | # GITHUB_REF will be refs/heads/master or refs/tags/MAJOR.MINOR.PATCH
|
|
153
|
+
build-bin/configure_deploy &&
|
|
154
|
+
build-bin/deploy $(echo ${GITHUB_REF} | cut -d/ -f 3)
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Example Travis setup
|
|
158
|
+
`.travis.yml` is a monolithic configuration file broken into stages. This means `test` and `deploy`
|
|
159
|
+
are in the same file. A simplest Travis `deploy` stage has two jobs: one for master pushes and
|
|
160
|
+
another for version tags. These jobs are controlled by event conditions.
|
|
161
|
+
|
|
162
|
+
The `if:` section obviates job creation and resource usage for irrelevant events. Travis does not
|
|
163
|
+
support file conditions. A `before_install` step to skip documentation-only commits will likely
|
|
164
|
+
complete in less than a minute (10 credit cost).
|
|
165
|
+
|
|
166
|
+
As billing is by the minute, it is most cost effective to combine test and deploy on master push.
|
|
167
|
+
|
|
168
|
+
Here's a partial `.travis.yml` including only the aspects mentioned above. Notice YAML anchors work
|
|
169
|
+
in Travis and `tag =~` [condition](https://github.com/travis-ci/travis-conditions) is a regular
|
|
170
|
+
expression.
|
|
171
|
+
```yaml
|
|
172
|
+
git:
|
|
173
|
+
depth: false # full git history for license check, and doc-only skipping
|
|
174
|
+
|
|
175
|
+
_terminate_if_only_docs: &terminate_if_only_docs |
|
|
176
|
+
if [ -n "${TRAVIS_COMMIT_RANGE}" ] && ! git diff --name-only "${TRAVIS_COMMIT_RANGE}" -- | grep -qv '\.md$'; then
|
|
177
|
+
echo "Stopping job as changes only affect documentation (ex. README.md)"
|
|
178
|
+
travis_terminate 0
|
|
179
|
+
fi
|
|
180
|
+
|
|
181
|
+
jobs:
|
|
182
|
+
include:
|
|
183
|
+
- stage: test
|
|
184
|
+
if: branch = master AND tag IS blank AND type IN (push, pull_request)
|
|
185
|
+
before_install: *terminate_if_only_docs
|
|
186
|
+
install: |
|
|
187
|
+
if [ "${TRAVIS_SECURE_ENV_VARS}" = "true" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
|
|
188
|
+
export SHOULD_DEPLOY=true
|
|
189
|
+
./build-bin/configure_deploy
|
|
190
|
+
else
|
|
191
|
+
export SHOULD_DEPLOY=false
|
|
192
|
+
./build-bin/configure_test
|
|
193
|
+
fi
|
|
194
|
+
script:
|
|
195
|
+
- ./build-bin/test || travis_terminate 1
|
|
196
|
+
- if [ "${SHOULD_DEPLOY}" != "true" ]; then travis_terminate 0; fi
|
|
197
|
+
- travis_wait ./build-bin/deploy master
|
|
198
|
+
- stage: deploy
|
|
199
|
+
# Ex. 8.272.10 or 15.0.1_p9
|
|
200
|
+
if: tag =~ /^[0-9]+\.[0-9]+\.[0-9]+/ AND type = push AND env(GH_TOKEN) IS present
|
|
201
|
+
install: ./build-bin/configure_deploy
|
|
202
|
+
script: ./build-bin/deploy ${TRAVIS_TAG}
|
|
203
|
+
```
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
set -ue
|
|
4
|
+
|
|
5
|
+
# This script sets up anything needed for `./deploy`. Do not assume `configure_test` was called.
|
|
6
|
+
#
|
|
7
|
+
# See [README.md] for an explanation of this and how CI should use it.
|
|
8
|
+
build-bin/gem/configure_gem_credentials
|
|
9
|
+
build-bin/gem/bundle_install
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
set -ue
|
|
4
|
+
|
|
5
|
+
# This script sets up anything needed for `./test`. This should not login to anything, as that
|
|
6
|
+
# should be done in `configure_deploy`.
|
|
7
|
+
#
|
|
8
|
+
# See [README.md] for an explanation of this and how CI should use it.
|
|
9
|
+
build-bin/gem/bundle_install
|
data/build-bin/deploy
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
set -ue
|
|
4
|
+
|
|
5
|
+
# This script deploys a release version.
|
|
6
|
+
#
|
|
7
|
+
# See [README.md] for an explanation of this and how CI should use it.
|
|
8
|
+
version=${1?version is required. ex 0.2.3}
|
|
9
|
+
|
|
10
|
+
export BUNDLE_GEMFILE=gemfiles/faraday_1.x.gemfile
|
|
11
|
+
build-bin/gem/gem_push zipkin-tracer ZipkinTracer ${version}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#
|
|
3
|
+
# Copyright 2014-2020 The OpenZipkin Authors
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
# in compliance with the License. You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
11
|
+
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
12
|
+
# or implied. See the License for the specific language governing permissions and limitations under
|
|
13
|
+
# the License.
|
|
14
|
+
#
|
|
15
|
+
|
|
16
|
+
set -ue
|
|
17
|
+
|
|
18
|
+
# This script ensures bundler is setup and install is run
|
|
19
|
+
gem install bundler
|
|
20
|
+
bundle install
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#
|
|
3
|
+
# Copyright 2014-2020 The OpenZipkin Authors
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
# in compliance with the License. You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
11
|
+
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
12
|
+
# or implied. See the License for the specific language governing permissions and limitations under
|
|
13
|
+
# the License.
|
|
14
|
+
#
|
|
15
|
+
|
|
16
|
+
set -ue
|
|
17
|
+
|
|
18
|
+
# This script configures rubygems_api_key needed to for gem-push
|
|
19
|
+
|
|
20
|
+
credentials_file="${HOME}/.gem/credentials"
|
|
21
|
+
mkdir -p "$(dirname "${credentials_file}")"
|
|
22
|
+
cat > "${credentials_file}" <<-EOF
|
|
23
|
+
---
|
|
24
|
+
:rubygems_api_key: ${RUBYGEMS_API_KEY}
|
|
25
|
+
EOF
|
|
26
|
+
chmod 0600 "${credentials_file}"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#
|
|
3
|
+
# Copyright 2014-2020 The OpenZipkin Authors
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
# in compliance with the License. You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
11
|
+
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
12
|
+
# or implied. See the License for the specific language governing permissions and limitations under
|
|
13
|
+
# the License.
|
|
14
|
+
#
|
|
15
|
+
|
|
16
|
+
set -ue
|
|
17
|
+
|
|
18
|
+
# This script pushes a gem version, updating version.rb if out-of-date.
|
|
19
|
+
#
|
|
20
|
+
# This assumes `configure_gem_credentials` and `bundle_install` were invoked.
|
|
21
|
+
gem=${1?gem is required. ex zipkin-tracer}
|
|
22
|
+
module=${2?module is required. ex ZipkinTracer}
|
|
23
|
+
version=${3?version is required. ex 0.2.3}
|
|
24
|
+
|
|
25
|
+
current_version=$(ruby -r ./lib/${gem}/version.rb -e "puts ${module}::VERSION")
|
|
26
|
+
|
|
27
|
+
if [ "${current_version}" != "${version}" ]; then
|
|
28
|
+
echo "Updating ${module}::VERSION from ${current_version} to ${version}"
|
|
29
|
+
cat > lib/${gem}/version.rb <<-EOF
|
|
30
|
+
# frozen_string_literal: true
|
|
31
|
+
|
|
32
|
+
module ${module}
|
|
33
|
+
VERSION = '${version}'
|
|
34
|
+
end
|
|
35
|
+
EOF
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
bundle exec rake build
|
|
39
|
+
gem push pkg/${gem}-${version}.gem
|
data/build-bin/test
ADDED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zipkin-tracer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.47.
|
|
4
|
+
version: 0.47.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Franklin Hu
|
|
@@ -14,7 +14,7 @@ authors:
|
|
|
14
14
|
autorequire:
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
|
-
date: 2020-
|
|
17
|
+
date: 2020-12-04 00:00:00.000000000 Z
|
|
18
18
|
dependencies:
|
|
19
19
|
- !ruby/object:Gem::Dependency
|
|
20
20
|
name: faraday
|
|
@@ -217,9 +217,14 @@ executables: []
|
|
|
217
217
|
extensions: []
|
|
218
218
|
extra_rdoc_files: []
|
|
219
219
|
files:
|
|
220
|
+
- ".github/CONTRIBUTING.md"
|
|
221
|
+
- ".github/ISSUE_TEMPLATE/bug.md"
|
|
222
|
+
- ".github/ISSUE_TEMPLATE/config.yml"
|
|
223
|
+
- ".github/ISSUE_TEMPLATE/feature.md"
|
|
224
|
+
- ".github/workflows/deploy.yml"
|
|
225
|
+
- ".github/workflows/test.yml"
|
|
220
226
|
- ".gitignore"
|
|
221
227
|
- ".rspec"
|
|
222
|
-
- ".travis.yml"
|
|
223
228
|
- Appraisals
|
|
224
229
|
- CHANGELOG.md
|
|
225
230
|
- Gemfile
|
|
@@ -230,6 +235,14 @@ files:
|
|
|
230
235
|
- Rakefile
|
|
231
236
|
- bin/console
|
|
232
237
|
- bin/setup
|
|
238
|
+
- build-bin/README.md
|
|
239
|
+
- build-bin/configure_deploy
|
|
240
|
+
- build-bin/configure_test
|
|
241
|
+
- build-bin/deploy
|
|
242
|
+
- build-bin/gem/bundle_install
|
|
243
|
+
- build-bin/gem/configure_gem_credentials
|
|
244
|
+
- build-bin/gem/gem_push
|
|
245
|
+
- build-bin/test
|
|
233
246
|
- gemfiles/faraday_0.x.gemfile
|
|
234
247
|
- gemfiles/faraday_1.x.gemfile
|
|
235
248
|
- lib/zipkin-tracer.rb
|
|
@@ -281,7 +294,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
281
294
|
- !ruby/object:Gem::Version
|
|
282
295
|
version: '0'
|
|
283
296
|
requirements: []
|
|
284
|
-
rubygems_version: 3.
|
|
297
|
+
rubygems_version: 3.1.4
|
|
285
298
|
signing_key:
|
|
286
299
|
specification_version: 4
|
|
287
300
|
summary: Ruby tracing via Zipkin
|
data/.travis.yml
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
language: ruby
|
|
2
|
-
dist: bionic
|
|
3
|
-
jdk: openjdk11
|
|
4
|
-
|
|
5
|
-
rvm:
|
|
6
|
-
- 2.3
|
|
7
|
-
- 2.4
|
|
8
|
-
- 2.5
|
|
9
|
-
- 2.6
|
|
10
|
-
- 2.7
|
|
11
|
-
- jruby-9.1
|
|
12
|
-
- jruby-9.2
|
|
13
|
-
|
|
14
|
-
gemfile:
|
|
15
|
-
- gemfiles/faraday_0.x.gemfile
|
|
16
|
-
- gemfiles/faraday_1.x.gemfile
|
|
17
|
-
|
|
18
|
-
script: bundle exec rspec
|
|
19
|
-
|
|
20
|
-
deploy:
|
|
21
|
-
provider: rubygems
|
|
22
|
-
api_key:
|
|
23
|
-
secure: HJquPWOoh9YKHTJrGTBriao4wVDu/tn+JwZphPrS38PNu5FkzyRuhjq2XyBrm8BkuJWdqkVx9rpJTlFkcjIfhpZOJUn5gtTUgp12/voUMWBCWw9AUfbYdYkGhy6Lmq6miJcUFkhdeiMmnliz0Wav1ZYEWkodC25ACKQiGtk9rwr+4wKkluljOnmbyPFRiF61ZjSaz4qy9ZpwWOSPGuEjCQuvhW1hx0VNBjsio59sKUK0v2lFHxSfMjW+QrB5GAV0isv4CtG5V9MKMlRBX8+4RbklO0LHdCmykTDTioyYrfBI0x7RiO/l453/EH4dQEzivZ9AQNtIIshPu1Zht63LHWff4JyytSGxe5WmXaQjxfrZi2LMIXbeg5g2pPDmiMqFVSCgxFKJQW1eyU9pF3w5C4v9P0uLeizGnLReOwwjBDqiWIQ2bR4YWn+fsg/wbhjXHmefEjcJYL59niK8pw1JOcg7fy/P32wbbqILUcIg3of1ih1lyPV4YBY62KJny6e0c83zX2KukVMP9M6crW2NEspMqcQWFzbp3SR9oM0ziMDGUs0s1/PKVtuFTZ2S+ykbawX5P9YqSSx8iXp+Ez5MAMbrjiPXlzpzMvudDaN3kqRT2EomJ4iQjJOxXgUyTspLpZFojh4+RVjgi+sGEA8SeNiqrytThsCwQV1ro8ymL+8=
|
|
24
|
-
gem: zipkin-tracer
|
|
25
|
-
on:
|
|
26
|
-
tags: true
|
|
27
|
-
repo: openzipkin/zipkin-ruby
|
|
28
|
-
condition: $TRAVIS_RUBY_VERSION == 2.7 && $BUNDLE_GEMFILE == $TRAVIS_BUILD_DIR/gemfiles/faraday_1.x.gemfile
|
|
29
|
-
|
|
30
|
-
notifications:
|
|
31
|
-
webhooks:
|
|
32
|
-
urls:
|
|
33
|
-
- https://webhooks.gitter.im/e/ead3c37d57527214e9f2
|
|
34
|
-
- https://webhooks.gitter.im/e/e57478303f87ecd7bffc
|
|
35
|
-
on_success: change
|
|
36
|
-
on_failure: always
|