elastic-apm 4.9.0 → 4.10.0

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.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/.pre-commit-config.yaml +1 -1
  3. data/CONTRIBUTING.md +13 -9
  4. data/Gemfile +43 -6
  5. data/docs/reference/getting-started-rails.md +14 -0
  6. data/docs/reference/graphql.md +1 -1
  7. data/docs/reference/supported-technologies.md +3 -3
  8. data/docs/release-notes/index.md +36 -4
  9. data/elastic-apm.gemspec +6 -3
  10. data/lib/elastic_apm/config.rb +1 -0
  11. data/lib/elastic_apm/error_builder.rb +1 -0
  12. data/lib/elastic_apm/graphql.rb +8 -0
  13. data/lib/elastic_apm/spies/sidekiq.rb +36 -1
  14. data/lib/elastic_apm/spies/sneakers.rb +4 -1
  15. data/lib/elastic_apm/spies/solid_queue.rb +80 -0
  16. data/lib/elastic_apm/stacktrace_builder.rb +1 -1
  17. data/lib/elastic_apm/transport/connection/proxy_pipe.rb +11 -1
  18. data/lib/elastic_apm/transport/connection.rb +1 -1
  19. data/lib/elastic_apm/transport/worker.rb +1 -1
  20. data/lib/elastic_apm/version.rb +1 -1
  21. data/updatecli-compose.yaml +4 -4
  22. metadata +6 -56
  23. data/.ci/.codecov.yml +0 -5
  24. data/.ci/.exclude.yml +0 -138
  25. data/.ci/.framework.yml +0 -10
  26. data/.ci/.main_framework.yml +0 -4
  27. data/.ci/.ruby.yml +0 -10
  28. data/.ci/docker/jruby/11-jdk/Dockerfile +0 -46
  29. data/.ci/docker/jruby/12-jdk/Dockerfile +0 -44
  30. data/.ci/docker/jruby/13-jdk/Dockerfile +0 -44
  31. data/.ci/docker/jruby/7-jdk/Dockerfile +0 -44
  32. data/.ci/docker/jruby/8-jdk/Dockerfile +0 -46
  33. data/.ci/docker/jruby/README.md +0 -31
  34. data/.ci/docker/jruby/run.sh +0 -97
  35. data/.ci/docker/jruby/test.sh +0 -28
  36. data/.ci/scripts/bench.sh +0 -52
  37. data/.ci/scripts/install-build-system.sh +0 -5
  38. data/.ci/updatecli/values.d/apm-data-spec.yml +0 -1
  39. data/.ci/updatecli/values.d/apm-gherkin.yml +0 -1
  40. data/.ci/updatecli/values.d/apm-json-specs.yml +0 -1
  41. data/.ci/updatecli/values.d/scm.yml +0 -10
  42. data/.ci/updatecli/values.d/update-compose.yml +0 -3
  43. data/.github/CODEOWNERS +0 -1
  44. data/.github/ISSUE_TEMPLATE/Bug_report.md +0 -40
  45. data/.github/ISSUE_TEMPLATE/Feature_request.md +0 -17
  46. data/.github/PULL_REQUEST_TEMPLATE.md +0 -60
  47. data/.github/dependabot.yml +0 -35
  48. data/.github/labeler-config.yml +0 -3
  49. data/.github/workflows/README.md +0 -57
  50. data/.github/workflows/addToProject.yml +0 -63
  51. data/.github/workflows/ci-docs.yml +0 -20
  52. data/.github/workflows/ci.yml +0 -70
  53. data/.github/workflows/docs-build.yml +0 -16
  54. data/.github/workflows/docs-deploy.yml +0 -16
  55. data/.github/workflows/docs-preview-cleanup.yml +0 -12
  56. data/.github/workflows/github-commands-comment.yml +0 -18
  57. data/.github/workflows/labeler.yml +0 -21
  58. data/.github/workflows/microbenchmark.yml +0 -31
  59. data/.github/workflows/release.yml +0 -87
  60. data/.github/workflows/run-matrix.yml +0 -68
  61. data/.github/workflows/test-reporter.yml +0 -25
  62. data/.github/workflows/updatecli.yml +0 -61
  63. data/bench/.gitignore +0 -2
  64. data/bench/app.rb +0 -53
  65. data/bench/benchmark.rb +0 -36
  66. data/bench/report.rb +0 -55
  67. data/bench/rubyprof.rb +0 -40
  68. data/bench/sql.rb +0 -49
  69. data/bench/stackprof.rb +0 -23
  70. data/bench/tmp/.gitkeep +0 -0
data/.ci/scripts/bench.sh DELETED
@@ -1,52 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- # Bash strict mode
4
- set -eo pipefail
5
-
6
- # Found current script directory
7
- RELATIVE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
8
-
9
- # Found project directory
10
- BASE_PROJECT="$(dirname "$(dirname "${RELATIVE_DIR}")")"
11
-
12
- ## Buildkite specific configuration
13
- if [ "$CI" == "true" ] ; then
14
- # If HOME is not set then use the Buildkite workspace
15
- # that's normally happening when running in the CI
16
- # owned by Elastic.
17
- if [ -z "$HOME" ] ; then
18
- HOME=$BUILDKITE_BUILD_CHECKOUT_PATH
19
- export HOME
20
- fi
21
-
22
- # required when running the benchmark
23
- PATH=$PATH:$HOME/.local/bin
24
- export PATH
25
-
26
- echo 'Docker login is done in the Buildkite hooks'
27
- fi
28
-
29
- # It does not fail so it runs for every single version and then we report the error at the end.
30
- set +e
31
- status=0
32
-
33
- for VERSION in "ruby:3.1" "ruby:3.0" "ruby:2.7" "ruby:2.6" "jruby:9.2" ; do
34
- ## Transform the versions like:
35
- ## jruby:9.1 to jruby-9.1
36
- echo "--- Benchmark for :ruby: ${VERSION}"
37
- OUTPUT_NAME=benchmark-$(echo "${VERSION//:/-}")
38
-
39
- # TBC, maybe a timeout could help so it can run the other versions?
40
- ${BASE_PROJECT}/spec/scripts/benchmarks.sh "${VERSION}" "${OUTPUT_NAME}"
41
-
42
- # Gather error if any
43
- if [ $? -gt 0 ] ; then
44
- status=1
45
- fi
46
-
47
- # Then we ship the data using the helper
48
- sendBenchmark "${ES_USER_SECRET}" "${ES_PASS_SECRET}" "${ES_URL_SECRET}" "${BASE_PROJECT}/spec/${OUTPUT_NAME}.bulk"
49
- done
50
-
51
- # Report status
52
- exit $status
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -euxo pipefail
4
-
5
- gem install rake yard rspec
@@ -1 +0,0 @@
1
- apm_schema_specs_path: spec/fixtures
@@ -1 +0,0 @@
1
- apm_gherkin_specs_path: features
@@ -1 +0,0 @@
1
- apm_json_specs_path: spec/fixtures
@@ -1,10 +0,0 @@
1
- scm:
2
- enabled: true
3
- owner: elastic
4
- repository: apm-agent-ruby
5
- branch: main
6
- commitusingapi: true
7
- # begin update-compose policy values
8
- user: obltmachine
9
- email: obltmachine@users.noreply.github.com
10
- # end update-compose policy values
@@ -1,3 +0,0 @@
1
- spec:
2
- files:
3
- - "updatecli-compose.yaml"
data/.github/CODEOWNERS DELETED
@@ -1 +0,0 @@
1
- /.github/workflows @elastic/observablt-ci
@@ -1,40 +0,0 @@
1
- ---
2
- name: Bug report
3
- about: Create a report to help us improve
4
-
5
- ---
6
-
7
- ## Describe the bug
8
-
9
- ## Steps to reproduce
10
- <!--
11
- 1. ...
12
- 2. ...
13
- 3. ...
14
- 4. ...
15
- -->
16
-
17
- ## Expected behavior
18
-
19
- ## Environment
20
- <!-- Please complete the following information -->
21
- - **OS**: <!-- [e.g. Linux] -->
22
- - **Ruby version**:
23
- - **Framework and version**: <!-- [e.g. Rails 6.0.1] -->
24
- - **APM Server version**:
25
- - **Agent version**:
26
-
27
-
28
- ## Additional context
29
-
30
- Add any other context about the problem here.
31
-
32
- - Agent config options <!-- be careful not to post sensitive information -->
33
- <details>
34
- <summary>Click to expand</summary>
35
-
36
- ```
37
- replace this line with your agent config options
38
- remember to mask any sensitive fields like tokens
39
- ```
40
- </details>
@@ -1,17 +0,0 @@
1
- ---
2
- name: Feature request
3
- about: Suggest an idea for this project
4
-
5
- ---
6
-
7
- ## Is your feature request related to a problem? Please describe.
8
- <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
9
-
10
- ## Describe the solution you'd like
11
- <!-- A clear and concise description of what you want to happen. -->
12
-
13
- ## Describe alternatives you've considered
14
- <!-- A clear and concise description of any alternative solutions or features you've considered. -->
15
-
16
- ## Additional context
17
- <!-- Add any other context or screenshots about the feature request here. -->
@@ -1,60 +0,0 @@
1
- <!--
2
- A few suggestions about filling out this PR
3
-
4
- 1. Use a descriptive title for the PR.
5
- 2. If this pull request is work in progress, create a draft PR instead of prefixing the title with WIP.
6
- 3. Please label this PR at least one of the following labels, depending on the scope of your change:
7
- - feature request, which adds new behavior
8
- - bug fix
9
- - enhancement, which modifies existing behavior
10
- - breaking change
11
- 4. Remove those recommended/optional sections if you don't need them. Only "What does this PR do", "Why is it important?" and "Checklist" are mandatory.
12
- 5. Generally, we require that you test any code you are adding or modifying.
13
- Once your changes are ready to submit for review:
14
- 6. Submit the pull request: Push your local changes to your forked copy of the repository and submit a pull request (https://help.github.com/articles/using-pull-requests).
15
- 7. Please be patient. We might not be able to review your code as fast as we would like to, but we'll do our best to dedicate to it the attention it deserves. Your effort is much appreciated!
16
- -->
17
-
18
- ## What does this pull request do?
19
-
20
- <!--
21
- Use this space to describe what the proposed code _does_, ie. what precisely will be done differently from this change.
22
- -->
23
-
24
- ## Why is it important?
25
-
26
- <!--
27
- Optionally provide an explanation of why this is important.
28
- -->
29
-
30
- ## Checklist
31
- <!--
32
- Add a checklist of things that are required to be reviewed in order to have the PR approved
33
-
34
- List here all the items you have verified BEFORE sending this PR. Please DO NOT remove any item, striking through those that do not apply. (Just in case, strikethrough uses two tildes. ~~Scratch this.~~)
35
- -->
36
-
37
- - [ ] I have signed the [Contributor License Agreement](https://www.elastic.co/contributor-agreement/).
38
- - [ ] My code follows the style guidelines of this project (See `.rubocop.yml`)
39
- - [ ] I have rebased my changes on top of the latest main branch
40
- <!--
41
- Update your local repository with the most recent code from the main repo, and rebase your branch on top of the latest main branch. We prefer your initial changes to be squashed into a single commit. Later, if we ask you to make changes, add them as separate commits. This makes them easier to review.
42
- -->
43
- - [ ] I have added tests that prove my fix is effective or that my feature works
44
- - [ ] New and existing [**unit** tests](https://github.com/elastic/apm-agent-ruby/blob/main/CONTRIBUTING.md#testing) pass locally with my changes
45
- <!--
46
- Run the test suite to make sure that nothing is broken. See https://github.com/elastic/apm-agent-ruby/blob/main/CONTRIBUTING.md#testing for details.
47
- -->
48
- - [ ] I have made corresponding changes to the documentation
49
- - [ ] I have updated [docs/release-notes/index.md](../docs/release-notes/index.md)
50
- - [ ] I have updated [docs/reference/supported-technologies.md](../docs/reference/supported-technologies.md)
51
- - [ ] Added an API method or config option? Document in which version this will be introduced
52
-
53
- ## Related issues
54
- <!--
55
- Link related issues below. Insert the issue link or reference after the word "Closes" if merging this should automatically close it.
56
- - Closes #ISSUE_ID
57
- - Relates #ISSUE_ID
58
- - Requires #ISSUE_ID
59
- - Superseds #ISSUE_ID
60
- -->
@@ -1,35 +0,0 @@
1
- ---
2
- version: 2
3
- updates:
4
-
5
- - package-ecosystem: bundler
6
- directory: "/"
7
- schedule:
8
- interval: "weekly"
9
- day: "sunday"
10
- time: "22:00"
11
- open-pull-requests-limit: 5
12
- ignore:
13
- - dependency-name: sucker_punch
14
- versions:
15
- - "> 2.0"
16
- - dependency-name: i18n
17
- versions:
18
- - 1.8.10
19
- - 1.8.8
20
- - 1.8.9
21
-
22
- # Maintain dependencies for GitHub Actions (/.github/workflows)
23
- - package-ecosystem: "github-actions"
24
- directory: "/"
25
- schedule:
26
- interval: "weekly"
27
- day: "sunday"
28
- time: "22:00"
29
- open-pull-requests-limit: 5
30
- labels:
31
- - dependencies
32
- groups:
33
- github-actions:
34
- patterns:
35
- - "*"
@@ -1,3 +0,0 @@
1
- # add 'agent-ruby' label to all new issues
2
- agent-ruby:
3
- - '.*'
@@ -1,57 +0,0 @@
1
- ## CI/CD
2
-
3
- There are 5 main stages that run on GitHub actions:
4
-
5
- * Linting
6
- * Test
7
- * Test `main` versions
8
- * Package
9
- * Release
10
-
11
- There are some other stages that run for every push on the main branches:
12
-
13
- * [Microbenchmark](./microbenchmark.yml)
14
-
15
- ### Scenarios
16
-
17
- * Compatibility matrix runs on branches, tags and PRs basis.
18
- * Tests should be triggered on branch, tag and PR basis.
19
- * Commits that are only affecting the docs files should not trigger any test or similar stages that are not required.
20
- * Automated release in the CI gets triggered when a tag release is created.
21
- * **This is not the case yet**, but if Github secrets are required then Pull Requests from forked repositories won't run any build accessing those secrets. If needed, then create a feature branch.
22
-
23
- ### Compatibility matrix
24
-
25
- Ruby agent supports compatibility to different ruby versions and frameworks, those are defined in:
26
-
27
- * [frameworks](../../.ci/.framework.yml) for all the PRs.
28
- * [frameworks](../../.ci/.main_framework.yml) for all the PRs using the `main` branches.
29
- * Ruby [versions](../../.ci/.ruby.yml) for all the `*nix` builds.
30
- * [Exclude list](../../.ci/.exclude.yml) for the above entries.
31
-
32
- ### How to interact with the CI?
33
-
34
- #### On a PR basis
35
-
36
- Once a PR has been opened then there are two different ways you can trigger builds in the CI:
37
-
38
- 1. Commit based
39
- 1. UI based, any Elasticians can force a build through the GitHub UI
40
-
41
- #### Branches
42
-
43
- Every time there is a merge to main or any release branches the whole workflow will compile and test every entry in the compatibility matrix for Linux.
44
-
45
- ### Release process
46
-
47
- This process has been fully automated and it gets triggered when a tag release has been created.
48
- The tag release follows the naming convention: `v.<major>.<minor>.<patch>`, where `<major>`, `<minor>` and `<patch>`.
49
-
50
- ### OpenTelemetry
51
-
52
- Every workflow and its logs are exported to OpenTelemetry traces/logs/metrics. Those details can be seen [here](https://ela.st/oblt-ci-cd-stats) (**NOTE**: only available for Elasticians).
53
-
54
- ## Bump automation
55
-
56
- [updatecli](https://www.updatecli.io/) is the tool we use to automatically update the specs
57
- the [APM agents](./updatecli.yml) use.
@@ -1,63 +0,0 @@
1
- name: Auto Assign to Project(s)
2
-
3
- on:
4
- issues:
5
- types: [opened, edited, milestoned]
6
- pull_request_target:
7
- types: [opened, edited, milestoned]
8
-
9
- permissions:
10
- contents: read
11
-
12
- jobs:
13
- assign_one_project:
14
- runs-on: ubuntu-latest
15
- name: Assign milestoned to Project
16
- steps:
17
- - name: Get token
18
- id: get_token
19
- uses: actions/create-github-app-token@v3
20
- with:
21
- app-id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
22
- private-key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
23
- permission-organization-projects: write
24
- permission-issues: read
25
- permission-pull-requests: read
26
-
27
- - name: Add milestoned issues to project
28
- id: add-issue-to-project
29
- if: github.event.issue && github.event.issue.milestone
30
- uses: elastic/oblt-actions/github/project-add@v1
31
- with:
32
- github-token: ${{ steps.get_token.outputs.token }}
33
- project-id: 1674
34
- item-url: ${{ github.event.issue.html_url }}
35
-
36
- - name: Set issue status to Planned
37
- if: github.event.issue && github.event.issue.milestone
38
- uses: elastic/oblt-actions/github/project-field-set@v1
39
- with:
40
- github-token: ${{ steps.get_token.outputs.token }}
41
- project-id: 1674
42
- item-id: ${{ steps.add-issue-to-project.outputs.item-id }}
43
- field-name: Status
44
- field-value: Planned
45
-
46
- - name: Add new pull requests to project
47
- id: add-pr-to-project
48
- if: github.event.action == 'opened' && github.event.pull_request
49
- uses: elastic/oblt-actions/github/project-add@v1
50
- with:
51
- github-token: ${{ steps.get_token.outputs.token }}
52
- project-id: 1674
53
- item-url: ${{ github.event.pull_request.html_url }}
54
-
55
- - name: Set pull request status to In Progress
56
- if: github.event.action == 'opened' && github.event.pull_request
57
- uses: elastic/oblt-actions/github/project-field-set@v1
58
- with:
59
- github-token: ${{ steps.get_token.outputs.token }}
60
- project-id: 1674
61
- item-id: ${{ steps.add-pr-to-project.outputs.item-id }}
62
- field-name: Status
63
- field-value: In Progress
@@ -1,20 +0,0 @@
1
- ---
2
- # This workflow sets the test / all status check to success in case it's a docs only PR and ci.yml is not triggered
3
- # https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
4
- name: ci # The name must be the same as in ci.yml
5
-
6
- on:
7
- pull_request:
8
- paths-ignore: # This expression needs to match the paths ignored on ci.yml.
9
- - '**'
10
- - '!**/*.md'
11
- - '!**/*.asciidoc'
12
-
13
- permissions:
14
- contents: read
15
-
16
- jobs:
17
- all:
18
- runs-on: ubuntu-latest
19
- steps:
20
- - run: 'echo "No build required"'
@@ -1,70 +0,0 @@
1
- name: ci
2
-
3
- on:
4
- pull_request:
5
- paths-ignore:
6
- - "**/*.asciidoc"
7
- - "**/*.md"
8
- push:
9
- branches:
10
- - main
11
- paths-ignore:
12
- - "**/*.asciidoc"
13
- - "**/*.md"
14
-
15
- permissions:
16
- contents: read
17
-
18
- jobs:
19
- sanity-checks:
20
- runs-on: ubuntu-latest
21
- steps:
22
- - uses: elastic/oblt-actions/pre-commit@v1
23
-
24
- # Invokes the actual matrix workflow with the provided files.
25
- matrix:
26
- uses: ./.github/workflows/run-matrix.yml
27
- with:
28
- versionsFile: .ci/.ruby.yml
29
- frameworksFile: .ci/.framework.yml
30
- excludedFile: .ci/.exclude.yml
31
-
32
- # Invokes the actual matrix workflow with the provided files.
33
- # In this case it's for the main frameworks.
34
- matrix-main-frameworks:
35
- uses: ./.github/workflows/run-matrix.yml
36
- with:
37
- versionsFile: .ci/.ruby.yml
38
- frameworksFile: .ci/.main_framework.yml
39
- excludedFile: .ci/.exclude.yml
40
-
41
- package:
42
- runs-on: ubuntu-latest
43
- steps:
44
- - uses: actions/checkout@v4
45
- - uses: ruby/setup-ruby@v1
46
- with:
47
- ruby-version: 2.6
48
- - name: Install build system
49
- run: .ci/scripts/install-build-system.sh
50
- - name: Create gem
51
- run: rake build
52
- - uses: actions/upload-artifact@v4
53
- with:
54
- name: package
55
- path: ./pkg/**/*
56
-
57
- all:
58
- if: always()
59
- runs-on: ubuntu-latest
60
- needs:
61
- - sanity-checks
62
- - matrix
63
- - matrix-main-frameworks
64
- - package
65
- steps:
66
- - id: check
67
- uses: elastic/oblt-actions/check-dependent-jobs@v1
68
- with:
69
- jobs: ${{ toJSON(needs) }}
70
- - run: ${{ steps.check.outputs.is-success }}
@@ -1,16 +0,0 @@
1
- name: docs-build
2
- on:
3
- pull_request:
4
- branches: [main]
5
- types: [opened, synchronize, reopened]
6
- push:
7
- branches: [main]
8
- merge_group: ~
9
- permissions:
10
- contents: read
11
- pull-requests: read
12
- jobs:
13
- build:
14
- uses: elastic/docs-actions/.github/workflows/docs-build.yml@v1
15
- with:
16
- enable-vale-linting: true
@@ -1,16 +0,0 @@
1
- name: docs-deploy
2
- on:
3
- workflow_run:
4
- workflows: [docs-build]
5
- types: [completed]
6
- permissions:
7
- contents: read
8
- deployments: write
9
- id-token: write
10
- pull-requests: write
11
- actions: read
12
- jobs:
13
- deploy:
14
- uses: elastic/docs-actions/.github/workflows/docs-deploy.yml@v1
15
- with:
16
- enable-vale-linting: true
@@ -1,12 +0,0 @@
1
- name: docs-preview-cleanup
2
- on:
3
- pull_request_target:
4
- branches: [main]
5
- types: [closed]
6
- permissions:
7
- contents: none
8
- deployments: write
9
- id-token: write
10
- jobs:
11
- cleanup:
12
- uses: elastic/docs-actions/.github/workflows/docs-preview-cleanup.yml@v1
@@ -1,18 +0,0 @@
1
- ---
2
- name: github-commands-comment
3
-
4
- on:
5
- pull_request_target:
6
- types:
7
- - opened
8
-
9
- permissions:
10
- contents: read
11
-
12
- jobs:
13
- comment:
14
- runs-on: ubuntu-latest
15
- permissions:
16
- pull-requests: write
17
- steps:
18
- - uses: elastic/oblt-actions/elastic/github-commands@v1
@@ -1,21 +0,0 @@
1
- name: "Issue Labeler"
2
- on:
3
- issues:
4
- types: [opened]
5
- pull_request_target:
6
- types: [opened]
7
-
8
- permissions:
9
- contents: read
10
- issues: write
11
- pull-requests: write
12
-
13
- jobs:
14
- triage:
15
- runs-on: ubuntu-latest
16
- steps:
17
- - uses: AlexanderWert/issue-labeler@v2.3
18
- with:
19
- repo-token: "${{ secrets.GITHUB_TOKEN }}"
20
- configuration-path: .github/labeler-config.yml
21
- enable-versioned-regex: 0
@@ -1,31 +0,0 @@
1
- name: microbenchmark
2
-
3
- on:
4
- workflow_dispatch:
5
- push:
6
- branches:
7
- - main
8
- paths-ignore:
9
- - '**.md'
10
- - '**.asciidoc'
11
-
12
- # limit the access of the generated GITHUB_TOKEN
13
- permissions:
14
- contents: read
15
-
16
- jobs:
17
- microbenchmark:
18
- runs-on: ubuntu-latest
19
- timeout-minutes: 5
20
- steps:
21
- - name: Run microbenchmark
22
- uses: elastic/oblt-actions/buildkite/run@v1
23
- with:
24
- pipeline: "apm-agent-microbenchmark"
25
- token: ${{ secrets.BUILDKITE_TOKEN }}
26
- wait-for: false
27
- env-vars: |
28
- script=.ci/scripts/bench.sh
29
- repo=apm-agent-ruby
30
- sha=${{ github.sha }}
31
- BRANCH_NAME=${{ github.ref_name }}
@@ -1,87 +0,0 @@
1
- name: release
2
-
3
- on:
4
- push:
5
- tags:
6
- - "v[0-9]+*"
7
- branches:
8
- - main
9
-
10
- permissions:
11
- contents: read
12
-
13
- jobs:
14
- release:
15
- runs-on: ubuntu-latest
16
- permissions:
17
- artifact-metadata: write
18
- attestations: write
19
- contents: write
20
- id-token: write
21
- steps:
22
- - uses: actions/checkout@v4
23
- - uses: ruby/setup-ruby@v1
24
- with:
25
- ruby-version: 2.6
26
- - name: RubyGems login
27
- run: |
28
- RUBY_HOME="${HOME}/.gem"
29
- RUBY_CREDENTIALS_FILE="${RUBY_HOME}/credentials"
30
- mkdir -p "${RUBY_HOME}"
31
- echo '---' > "${RUBY_CREDENTIALS_FILE}"
32
- echo ":rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}" >> "${RUBY_CREDENTIALS_FILE}"
33
- chmod 0600 "${RUBY_CREDENTIALS_FILE}"
34
-
35
- - name: Install build system
36
- run: .ci/scripts/install-build-system.sh
37
-
38
- - name: rake release (only for tags)
39
- run: rake release
40
- if: startsWith(github.ref, 'refs/tags')
41
-
42
- - name: rake build
43
- run: rake build
44
- if: ${{ ! startsWith(github.ref, 'refs/tags') }}
45
-
46
- - name: generate build provenance
47
- uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0
48
- with:
49
- subject-path: "${{ github.workspace }}/pkg/*.gem"
50
-
51
- update-branch:
52
- needs:
53
- - release
54
- runs-on: ubuntu-latest
55
- permissions:
56
- contents: write
57
- steps:
58
- - uses: actions/checkout@v4
59
- - uses: ruby/setup-ruby@v1
60
- with:
61
- ruby-version: 2.6
62
- - name: Setup Git
63
- uses: elastic/oblt-actions/git/setup@v1
64
- - name: Install build system
65
- run: .ci/scripts/install-build-system.sh
66
- - name: rake release:update_branch (only for tags)
67
- run: rake release:update_branch
68
- if: startsWith(github.ref, 'refs/tags')
69
-
70
- status:
71
- if: always()
72
- runs-on: ubuntu-latest
73
- needs:
74
- - release
75
- - update-branch
76
- steps:
77
- - id: check
78
- uses: elastic/oblt-actions/check-dependent-jobs@v1
79
- with:
80
- jobs: ${{ toJSON(needs) }}
81
- - run: ${{ steps.check.outputs.is-success }}
82
- - if: ${{ always() && startsWith(github.ref, 'refs/tags') }}
83
- uses: elastic/oblt-actions/slack/notify-result@v1
84
- with:
85
- bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
86
- channel-id: "#apm-agent-ruby"
87
- message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>"