elastic-apm 4.5.1 → 4.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/.ci/.exclude.yml +193 -0
  3. data/.ci/{.jenkins_framework.yml → .framework.yml} +3 -2
  4. data/.ci/.main_framework.yml +4 -0
  5. data/.ci/.ruby.yml +10 -0
  6. data/.ci/docker/jruby/11-jdk/Dockerfile +8 -3
  7. data/.ci/docker/jruby/12-jdk/Dockerfile +5 -2
  8. data/.ci/docker/jruby/13-jdk/Dockerfile +5 -2
  9. data/.ci/docker/jruby/7-jdk/Dockerfile +6 -3
  10. data/.ci/docker/jruby/8-jdk/Dockerfile +8 -3
  11. data/.ci/docker/jruby/README.md +1 -1
  12. data/.ci/docker/jruby/run.sh +33 -9
  13. data/.ci/docker/jruby/test.sh +17 -2
  14. data/.ci/scripts/bench.sh +52 -0
  15. data/.ci/scripts/install-build-system.sh +5 -0
  16. data/.ci/snapshoty.yml +33 -0
  17. data/.ci/updatecli.d/update-gherkin-specs.yml +126 -0
  18. data/.ci/updatecli.d/update-json-specs.yml +130 -0
  19. data/.ci/updatecli.d/update-specs.yml +118 -0
  20. data/.github/dependabot.yml +17 -1
  21. data/.github/workflows/README.md +58 -0
  22. data/.github/workflows/ci-docs.yml +20 -0
  23. data/.github/workflows/ci.yml +70 -0
  24. data/.github/workflows/coverage-reporter.yml +34 -0
  25. data/.github/workflows/microbenchmark.yml +48 -0
  26. data/.github/workflows/opentelemetry.yml +27 -0
  27. data/.github/workflows/release.yml +71 -0
  28. data/.github/workflows/run-matrix.yml +56 -0
  29. data/.github/workflows/snapshoty.yml +35 -0
  30. data/.github/workflows/test-reporter.yml +24 -0
  31. data/.github/workflows/updatecli.yml +28 -0
  32. data/.pre-commit-config.yaml +0 -2
  33. data/CHANGELOG.asciidoc +73 -1
  34. data/CONTRIBUTING.md +1 -1
  35. data/Gemfile +28 -8
  36. data/README.md +1 -1
  37. data/Rakefile +2 -2
  38. data/bench/report.rb +1 -1
  39. data/bench/rubyprof.rb +1 -0
  40. data/bin/run-tests +10 -1
  41. data/docker-compose.yml +10 -1
  42. data/docs/configuration.asciidoc +12 -9
  43. data/docs/index.asciidoc +2 -2
  44. data/docs/{log-correlation.asciidoc → logs.asciidoc} +29 -2
  45. data/docs/opentracing.asciidoc +1 -1
  46. data/docs/redirects.asciidoc +9 -0
  47. data/elastic-apm.gemspec +3 -2
  48. data/lib/elastic_apm/central_config.rb +5 -0
  49. data/lib/elastic_apm/config/server_info.rb +50 -0
  50. data/lib/elastic_apm/config.rb +25 -4
  51. data/lib/elastic_apm/context_builder.rb +6 -3
  52. data/lib/elastic_apm/error.rb +2 -1
  53. data/lib/elastic_apm/error_builder.rb +1 -0
  54. data/lib/elastic_apm/instrumenter.rb +4 -2
  55. data/lib/elastic_apm/metadata/cloud_info.rb +9 -7
  56. data/lib/elastic_apm/metadata/system_info/container_info.rb +4 -3
  57. data/lib/elastic_apm/metadata/system_info.rb +1 -1
  58. data/lib/elastic_apm/metrics.rb +24 -20
  59. data/lib/elastic_apm/span/context/links.rb +32 -0
  60. data/lib/elastic_apm/span/context/service.rb +55 -0
  61. data/lib/elastic_apm/span/context.rb +19 -3
  62. data/lib/elastic_apm/span.rb +3 -0
  63. data/lib/elastic_apm/span_helpers.rb +8 -8
  64. data/lib/elastic_apm/spies/action_dispatch.rb +11 -3
  65. data/lib/elastic_apm/spies/faraday.rb +20 -4
  66. data/lib/elastic_apm/spies/racecar.rb +77 -0
  67. data/lib/elastic_apm/spies/redis.rb +1 -1
  68. data/lib/elastic_apm/spies/sequel.rb +9 -0
  69. data/lib/elastic_apm/spies/sqs.rb +1 -0
  70. data/lib/elastic_apm/trace_context/tracestate.rb +4 -2
  71. data/lib/elastic_apm/trace_context.rb +1 -1
  72. data/lib/elastic_apm/transport/connection/http.rb +9 -3
  73. data/lib/elastic_apm/transport/serializers/span_serializer.rb +25 -0
  74. data/lib/elastic_apm/version.rb +1 -1
  75. data/lib/elastic_apm.rb +1 -0
  76. metadata +46 -17
  77. data/.ci/.jenkins_exclude.yml +0 -134
  78. data/.ci/.jenkins_main_framework.yml +0 -4
  79. data/.ci/.jenkins_ruby.yml +0 -10
  80. data/.ci/Jenkinsfile +0 -441
  81. data/.ci/jobs/apm-agent-ruby-downstream.yml +0 -38
  82. data/.ci/jobs/apm-agent-ruby-linting-mbp.yml +0 -39
  83. data/.ci/jobs/apm-agent-ruby-mbp.yml +0 -43
  84. data/.ci/jobs/apm-agent-ruby.yml +0 -4
  85. data/.ci/jobs/defaults.yml +0 -24
  86. data/.ci/linting.groovy +0 -32
  87. data/.ci/packer_cache.sh +0 -16
  88. /data/.ci/{.jenkins_codecov.yml → .codecov.yml} +0 -0
data/.ci/Jenkinsfile DELETED
@@ -1,441 +0,0 @@
1
- #!/usr/bin/env groovy
2
- @Library('apm@current') _
3
-
4
- import co.elastic.matrix.*
5
- import groovy.transform.Field
6
-
7
- /**
8
- This is the parallel tasks generator,
9
- it is need as field to store the results of the tests.
10
- */
11
- @Field def rubyTasksGen
12
-
13
- pipeline {
14
- agent { label 'linux && immutable' }
15
- environment {
16
- REPO = 'apm-agent-ruby'
17
- BASE_DIR = "src/github.com/elastic/${env.REPO}"
18
- PIPELINE_LOG_LEVEL = 'INFO'
19
- NOTIFY_TO = credentials('notify-to')
20
- JOB_GCS_BUCKET = credentials('gcs-bucket')
21
- CODECOV_SECRET = 'secret/apm-team/ci/apm-agent-ruby-codecov'
22
- DOCKER_REGISTRY = 'docker.elastic.co'
23
- DOCKER_SECRET = 'secret/apm-team/ci/docker-registry/prod'
24
- GITHUB_CHECK_ITS_NAME = 'Integration Tests'
25
- ITS_PIPELINE = 'apm-integration-tests-selector-mbp/main'
26
- RELEASE_SECRET = 'secret/apm-team/ci/apm-agent-ruby-rubygems-release'
27
- OPBEANS_REPO = 'opbeans-ruby'
28
- REFERENCE_REPO = '/var/lib/jenkins/.git-references/apm-agent-ruby.git'
29
- SLACK_CHANNEL = '#apm-agent-ruby'
30
- }
31
- options {
32
- timeout(time: 2, unit: 'HOURS')
33
- buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20', daysToKeepStr: '30'))
34
- timestamps()
35
- ansiColor('xterm')
36
- disableResume()
37
- durabilityHint('PERFORMANCE_OPTIMIZED')
38
- rateLimitBuilds(throttle: [count: 60, durationName: 'hour', userBoost: true])
39
- quietPeriod(10)
40
- }
41
- triggers {
42
- issueCommentTrigger("(${obltGitHubComments()}|^run benchmark tests)")
43
- }
44
- parameters {
45
- booleanParam(name: 'Run_As_Main_Branch', defaultValue: false, description: 'Allow to run any steps on a PR, some steps normally only run on main branch.')
46
- booleanParam(name: 'bench_ci', defaultValue: true, description: 'Enable run benchmarks.')
47
- }
48
- stages {
49
- /**
50
- Checkout the code and stash it, to use it on other stages.
51
- */
52
- stage('Checkout') {
53
- options { skipDefaultCheckout() }
54
- steps {
55
- pipelineManager([ cancelPreviousRunningBuilds: [ when: 'PR' ] ])
56
- deleteDir()
57
- gitCheckout(basedir: "${BASE_DIR}", githubNotifyFirstTimeContributor: true, reference: "${env.REFERENCE_REPO}")
58
- stash allowEmpty: true, name: 'source', useDefaultExcludes: false
59
- script {
60
- dir("${BASE_DIR}"){
61
- // Skip all the stages except docs for PR's with asciidoc and md changes only
62
- env.ONLY_DOCS = isGitRegionMatch(patterns: [ '.*\\.(asciidoc|md)' ], shouldMatchAll: true)
63
- }
64
- }
65
- }
66
- }
67
- stage('Sanity checks') {
68
- when {
69
- beforeAgent true
70
- allOf {
71
- expression { return env.ONLY_DOCS == "false" }
72
- anyOf {
73
- not { changeRequest() }
74
- expression { return params.Run_As_Main_Branch }
75
- }
76
- }
77
- }
78
- options { skipDefaultCheckout() }
79
- environment {
80
- HOME = "${env.WORKSPACE}"
81
- PATH = "${env.WORKSPACE}/bin:${env.PATH}"
82
- }
83
- steps {
84
- withGithubNotify(context: 'Sanity checks') {
85
- deleteDir()
86
- unstash 'source'
87
- dir(BASE_DIR) {
88
- catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE', message: 'Sanity checks failed but keep running the build') {
89
- preCommit(commit: "${GIT_BASE_COMMIT}", junit: true)
90
- }
91
- }
92
- }
93
- }
94
- }
95
- /**
96
- Execute unit tests.
97
- */
98
- stage('Tests') {
99
- when {
100
- beforeAgent true
101
- expression { return env.ONLY_DOCS == "false" }
102
- }
103
- failFast false
104
- parallel {
105
- stage('Tests') {
106
- options { skipDefaultCheckout() }
107
- steps {
108
- withGithubNotify(context: 'Tests', tab: 'tests') {
109
- runTests('.ci/.jenkins_framework.yml')
110
- }
111
- }
112
- post {
113
- always {
114
- convergeCoverage()
115
- }
116
- }
117
- }
118
- stage('Main Tests frameworks') {
119
- options { skipDefaultCheckout() }
120
- steps {
121
- catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE', message: "The tests for the main framework have failed. Let's warn instead.") {
122
- runTests('.ci/.jenkins_main_framework.yml')
123
- }
124
- }
125
- }
126
- stage('Integration Tests') {
127
- agent none
128
- when {
129
- beforeAgent true
130
- anyOf {
131
- changeRequest()
132
- expression { return !params.Run_As_Main_Branch }
133
- }
134
- }
135
- steps {
136
- githubNotify(context: "${env.GITHUB_CHECK_ITS_NAME}", description: "${env.GITHUB_CHECK_ITS_NAME} ...", status: 'PENDING', targetUrl: "${env.JENKINS_URL}search/?q=${env.ITS_PIPELINE.replaceAll('/','+')}")
137
- build(job: env.ITS_PIPELINE, propagate: false, wait: true,
138
- parameters: [ string(name: 'INTEGRATION_TEST', value: 'Ruby'),
139
- string(name: 'BUILD_OPTS', value: "--ruby-agent-version ${env.GIT_BASE_COMMIT} --ruby-agent-version-state ${env.GIT_BUILD_CAUSE} --ruby-agent-repo ${env.CHANGE_FORK?.trim() ?: 'elastic'}/${env.REPO} --opbeans-ruby-agent-branch ${env.GIT_BASE_COMMIT}"),
140
- string(name: 'GITHUB_CHECK_NAME', value: env.GITHUB_CHECK_ITS_NAME),
141
- string(name: 'GITHUB_CHECK_REPO', value: env.REPO),
142
- string(name: 'GITHUB_CHECK_SHA1', value: env.GIT_BASE_COMMIT) ])
143
- }
144
- }
145
- }
146
- }
147
- stage('Benchmarks') {
148
- options { skipDefaultCheckout() }
149
- when {
150
- beforeAgent true
151
- allOf {
152
- anyOf {
153
- branch 'main'
154
- branch "\\d+\\.\\d+"
155
- branch "v\\d?"
156
- tag pattern: 'v\\d+.*', comparator: "REGEXP"
157
- expression { return params.Run_As_Main_Branch }
158
- expression { return env.GITHUB_COMMENT?.contains('benchmark tests') }
159
- }
160
- expression { return params.bench_ci }
161
- }
162
- }
163
- stages {
164
- stage('Clean Workspace') {
165
- agent { label 'metal' }
166
- steps {
167
- echo "Cleaning Workspace"
168
- }
169
- post {
170
- always {
171
- cleanWs()
172
- }
173
- }
174
- }
175
- /**
176
- Run the benchmarks and store the results on ES.
177
- The result JSON files are also archive into Jenkins.
178
- */
179
- stage('Run Benchmarks') {
180
- steps {
181
- withGithubNotify(context: 'Run Benchmarks') {
182
- deleteDir()
183
- unstash 'source'
184
- dir("${BASE_DIR}"){
185
- script {
186
- def versions = readYaml(file: ".ci/.jenkins_ruby.yml")
187
- def benchmarkTask = [:]
188
- versions['RUBY_VERSION'].each{ v ->
189
- benchmarkTask[v] = runBenchmark(v)
190
- }
191
- parallel(benchmarkTask)
192
- }
193
- }
194
- }
195
- }
196
- }
197
- }
198
- }
199
- stage('Release') {
200
- options { skipDefaultCheckout() }
201
- environment {
202
- RUBY_DOCKER_TAG = 'ruby:2.6'
203
- HOME = '/var/lib/jenkins'
204
- }
205
- when {
206
- beforeAgent true
207
- tag pattern: 'v\\d+.*', comparator: 'REGEXP'
208
- }
209
- stages {
210
- stage('Notify') {
211
- steps {
212
- notifyStatus(slackStatus: 'warning', subject: "[${env.REPO}] Release *${env.TAG_NAME}* ready to be pushed",
213
- body: "(<${env.RUN_DISPLAY_URL}|Open>).\n Changes: ${env.TAG_NAME}")
214
- }
215
- }
216
- stage('Release') {
217
- steps {
218
- deleteDir()
219
- unstash 'source'
220
- prepareRelease(){
221
- sh 'rake release'
222
- }
223
- }
224
- }
225
- stage('Update Branch') {
226
- steps {
227
- deleteDir()
228
- unstash 'source'
229
- prepareRelease(){
230
- catchError(buildResult: 'SUCCESS', message: 'Update branch task failed', stageResult: 'UNSTABLE') {
231
- sh 'rake release:update_branch'
232
- }
233
- }
234
- }
235
- post {
236
- success {
237
- notifyStatus(slackStatus: 'good', subject: "[${env.REPO}] Release *${env.TAG_NAME}* published",
238
- body: "Great news, the release has been done successfully. (<${env.RUN_DISPLAY_URL}|Open>).")
239
- }
240
- unsuccessful {
241
- notifyStatus(slackStatus: 'warning', subject: "[${env.REPO}] Release *${env.TAG_NAME}* has some sync-up post-release failures.",
242
- body: "Please go to ${env.BUILD_URL} to review the logs. Most likely you need to update the branch manually. (<${env.RUN_DISPLAY_URL}|Open>)")
243
- }
244
- }
245
- }
246
- stage('Opbeans') {
247
- environment {
248
- REPO_NAME = "${OPBEANS_REPO}"
249
- VERSION = "${env.BRANCH_NAME.replaceAll('^v', '')}"
250
- }
251
- steps {
252
- deleteDir()
253
- // Let's wait for the Gem to be available
254
- sh label: 'Wait for gem', script: """#!/usr/bin/env bash
255
- source /usr/local/bin/bash_standard_lib.sh
256
- (retry 10 curl --silent --show-error --fail -I https://rubygems.org/gems/elastic-apm/versions/${env.VERSION})
257
- """
258
- dir("${OPBEANS_REPO}"){
259
- git(credentialsId: 'f6c7695a-671e-4f4f-a331-acdce44ff9ba',
260
- url: "git@github.com:elastic/${OPBEANS_REPO}.git",
261
- branch: 'main')
262
- // It's required to transform the tag value to the gem version
263
- sh script: ".ci/bump-version.sh ${env.VERSION}", label: 'Bump version'
264
- // The opbeans pipeline will trigger a release for the main branch
265
- gitPush()
266
- // The opbeans pipeline will trigger a release for the release tag
267
- gitCreateTag(tag: "${env.BRANCH_NAME}")
268
- }
269
- }
270
- }
271
- }
272
- }
273
- }
274
- post {
275
- cleanup {
276
- notifyBuildResult()
277
- }
278
- }
279
- }
280
-
281
- /**
282
- Run benchmarks for a Ruby version, then report the results to the Elasticsearch server.
283
- */
284
- def runBenchmark(version){
285
- return {
286
- node('metal'){
287
- // Transform the versions like:
288
- // - docker.elastic.co/observability-ci/jruby:9.2-12-jdk to jruby-9.2-12-jdk
289
- // - jruby:9.1 to jruby-9.1
290
- def transformedVersion = version.replaceAll('.*/', '').replaceAll(':', '-')
291
- withEnv(["HOME=${env.WORKSPACE}/${transformedVersion}"]){
292
- dir("${transformedVersion}"){
293
- deleteDir()
294
- unstash 'source'
295
- dir("${BASE_DIR}"){
296
- retry(2){
297
- sleep randomNumber(min:10, max: 30)
298
- dockerLogin(secret: "${DOCKER_SECRET}", registry: "${DOCKER_REGISTRY}")
299
- }
300
- try{
301
- sh """./spec/scripts/benchmarks.sh "${version}" "${REFERENCE_REPO}" """
302
- } catch(e){
303
- throw e
304
- } finally {
305
- archiveArtifacts(
306
- allowEmptyArchive: true,
307
- artifacts: "**/benchmark-${transformedVersion}.raw,**/benchmark-${transformedVersion}.error",
308
- onlyIfSuccessful: false)
309
- sendBenchmarks(file: "benchmark-${transformedVersion}.bulk",
310
- index: "benchmark-ruby", archive: true)
311
- }
312
- }
313
- }
314
- }
315
- }
316
- }
317
- }
318
-
319
- class RubyParallelTaskGenerator extends DefaultParallelTaskGenerator {
320
-
321
- public RubyParallelTaskGenerator(Map params){
322
- super(params)
323
- }
324
-
325
- /**
326
- build a clousure that launch and agent and execute the corresponding test script,
327
- then store the results.
328
- */
329
- public Closure generateStep(x, y){
330
- return {
331
- steps.sleep steps.randomNumber(min:10, max: 30)
332
- steps.node('linux && immutable'){
333
- // Label is transformed to avoid using the internal docker registry in the x coordinate
334
- // TODO: def label = "${tag}:${x?.drop(x?.lastIndexOf('/')+1)}#${y}"
335
- def label = "${tag}:${x}#${y}"
336
- try {
337
- steps.runScript(label: label, ruby: x, framework: y)
338
- saveResult(x, y, 1)
339
- } catch(e){
340
- saveResult(x, y, 0)
341
- steps.error("${label} tests failed : ${e.toString()}\n")
342
- } finally {
343
- steps.junit(allowEmptyResults: false,
344
- keepLongStdio: true,
345
- testResults: "**/spec/junit-reports/**/ruby-agent-junit.xml")
346
- steps.dir("${steps.env.BASE_DIR}"){
347
- steps.archiveArtifacts(artifacts: 'coverage/matrix_results/', defaultExcludes: false)
348
- steps.stash(name: steps.normalise("coverage-${x}-${y}"), includes: 'coverage/matrix_results/', allowEmpty: true)
349
- }
350
- }
351
- }
352
- }
353
- }
354
- }
355
-
356
- /**
357
- Run all the tests for the given file with the frameworks to test
358
- */
359
- def runTests(frameworkFile) {
360
- deleteDir()
361
- unstash "source"
362
- dir("${BASE_DIR}"){
363
- rubyTasksGen = new RubyParallelTaskGenerator(
364
- xKey: 'RUBY_VERSION',
365
- yKey: 'FRAMEWORK',
366
- xFile: ".ci/.jenkins_ruby.yml",
367
- yFile: frameworkFile,
368
- exclusionFile: ".ci/.jenkins_exclude.yml",
369
- tag: "Ruby",
370
- name: "Ruby",
371
- steps: this
372
- )
373
- def testTasks = rubyTasksGen.generateParallelTests()
374
- parallel(testTasks)
375
- }
376
- }
377
-
378
- /**
379
- Run tests for a Ruby version and framework version.
380
- */
381
- def runScript(Map params = [:]){
382
- def label = params.label
383
- def ruby = params.ruby
384
- def framework = params.framework
385
- log(level: 'INFO', text: "${label}")
386
- retry(2){
387
- withEnv(["HOME=${env.WORKSPACE}", "PATH=${env.PATH}:${env.WORKSPACE}/bin"]) {
388
- deleteDir()
389
- unstash 'source'
390
- dir("${BASE_DIR}"){
391
- sleep randomNumber(min:10, max: 30)
392
- dockerLogin(secret: "${DOCKER_SECRET}", registry: "${DOCKER_REGISTRY}")
393
- sh(label: "Run BDD tests", script: "./spec/scripts/features.sh ${ruby}")
394
- sh("./spec/scripts/spec.sh ${ruby} ${framework}")
395
- }
396
- }
397
- }
398
- }
399
-
400
- def convergeCoverage() {
401
- deleteDir()
402
- unstash('source')
403
- dir("${BASE_DIR}"){
404
- rubyTasksGen.dumpMatrix('-')?.each {
405
- unstash(normalise("coverage-${it}"))
406
- }
407
- sh(script: './spec/scripts/coverage_converge.sh')
408
- cobertura coberturaReportFile: 'coverage/coverage.xml', onlyStable: false
409
- }
410
- }
411
-
412
- def prepareRelease(Closure body){
413
- dir("${env.BASE_DIR}"){
414
- docker.image("${env.RUBY_DOCKER_TAG}").inside('-v ${REFERENCE_REPO}:${REFERENCE_REPO} -v /etc/passwd:/etc/passwd -v ${HOME}/.ssh:${HOME}/.ssh') {
415
- withEnv(["HOME=${env.WORKSPACE}/${env.BASE_DIR ?: ''}"]) {
416
- rubygemsLogin.withApi(secret: "${env.RELEASE_SECRET}") {
417
- withGitRelease(credentialsId: '2a9602aa-ab9f-4e52-baf3-b71ca88469c7-UserAndToken') {
418
- sh 'gem install rake yard rspec'
419
- body()
420
- }
421
- }
422
- }
423
- }
424
- }
425
- }
426
-
427
- // Transform the versions like:
428
- // - docker.elastic.co/observability-ci/jruby:9.2-12-jdk to jruby-9.2-12-jdk
429
- // - jruby:9.1 to jruby-9.1
430
- def normalise(def what) {
431
- return what.replaceAll('.*/', '').replaceAll(':', '-')
432
- }
433
-
434
- def notifyStatus(def args = [:]) {
435
- releaseNotification(slackChannel: "${env.SLACK_CHANNEL}",
436
- slackColor: args.slackStatus,
437
- slackCredentialsId: 'jenkins-slack-integration-token',
438
- to: "${env.NOTIFY_TO}",
439
- subject: args.subject,
440
- body: args.body)
441
- }
@@ -1,38 +0,0 @@
1
- ---
2
- - job:
3
- name: apm-agent-ruby/apm-agent-ruby-downstream
4
- display-name: APM Agent Ruby Downstream
5
- description: APM Agent Ruby Downstream .
6
- script-path: .ci/downstreamTests.groovy
7
- scm:
8
- - github:
9
- branch-discovery: no-pr
10
- discover-pr-forks-strategy: merge-current
11
- discover-pr-forks-trust: permission
12
- discover-pr-origin: merge-current
13
- discover-tags: true
14
- notification-context: 'apm-ci/downstream'
15
- property-strategies:
16
- all-branches:
17
- - suppress-scm-triggering: true
18
- repo: apm-agent-ruby
19
- repo-owner: elastic
20
- credentials-id: 2a9602aa-ab9f-4e52-baf3-b71ca88469c7-UserAndToken
21
- ssh-checkout:
22
- credentials: f6c7695a-671e-4f4f-a331-acdce44ff9ba
23
- clean:
24
- after: true
25
- before: true
26
- prune: true
27
- shallow-clone: true
28
- depth: 3
29
- do-not-fetch-tags: true
30
- submodule:
31
- disable: false
32
- recursive: true
33
- parent-credentials: true
34
- timeout: 100
35
- reference-repo: /var/lib/jenkins/.git-references/apm-agent-ruby.git
36
- timeout: '15'
37
- use-author: true
38
- wipe-workspace: 'True'
@@ -1,39 +0,0 @@
1
- ---
2
- - job:
3
- name: apm-agent-ruby/apm-agent-ruby-linting-mbp
4
- display-name: APM Agent Ruby Linting
5
- description: APM Agent Ruby Linting
6
- script-path: .ci/linting.groovy
7
- scm:
8
- - github:
9
- branch-discovery: no-pr
10
- discover-pr-forks-strategy: merge-current
11
- discover-pr-forks-trust: permission
12
- discover-pr-origin: merge-current
13
- discover-tags: false
14
- notification-context: 'apm-ci/linting'
15
- head-filter-regex: '^PR-.*$'
16
- repo: apm-agent-ruby
17
- repo-owner: elastic
18
- credentials-id: 2a9602aa-ab9f-4e52-baf3-b71ca88469c7-UserAndToken
19
- ssh-checkout:
20
- credentials: f6c7695a-671e-4f4f-a331-acdce44ff9ba
21
- build-strategies:
22
- - change-request:
23
- ignore-target-only-changes: false
24
- clean:
25
- after: true
26
- before: true
27
- prune: true
28
- shallow-clone: true
29
- depth: 3
30
- do-not-fetch-tags: true
31
- submodule:
32
- disable: false
33
- recursive: true
34
- parent-credentials: true
35
- timeout: 100
36
- reference-repo: /var/lib/jenkins/.git-references/apm-agent-ruby.git
37
- timeout: '15'
38
- use-author: true
39
- wipe-workspace: 'True'
@@ -1,43 +0,0 @@
1
- ---
2
- - job:
3
- name: apm-agent-ruby/apm-agent-ruby-mbp
4
- display-name: APM Agent Ruby
5
- description: APM Agent Ruby
6
- script-path: .ci/Jenkinsfile
7
- scm:
8
- - github:
9
- branch-discovery: no-pr
10
- discover-pr-forks-strategy: merge-current
11
- discover-pr-forks-trust: permission
12
- discover-pr-origin: merge-current
13
- discover-tags: true
14
- notification-context: 'apm-ci'
15
- repo: apm-agent-ruby
16
- repo-owner: elastic
17
- credentials-id: 2a9602aa-ab9f-4e52-baf3-b71ca88469c7-UserAndToken
18
- head-filter-regex: '^(main|PR-.*|[3-9]\.x|v4\.[5-9]+.*|v[5-9]+.*)$'
19
- ssh-checkout:
20
- credentials: f6c7695a-671e-4f4f-a331-acdce44ff9ba
21
- build-strategies:
22
- - tags:
23
- ignore-tags-older-than: -1
24
- ignore-tags-newer-than: -1
25
- - regular-branches: true
26
- - change-request:
27
- ignore-target-only-changes: false
28
- clean:
29
- after: true
30
- before: true
31
- prune: true
32
- shallow-clone: true
33
- depth: 3
34
- do-not-fetch-tags: true
35
- submodule:
36
- disable: false
37
- recursive: true
38
- parent-credentials: true
39
- timeout: 100
40
- reference-repo: /var/lib/jenkins/.git-references/apm-agent-ruby.git
41
- timeout: '15'
42
- use-author: true
43
- wipe-workspace: 'True'
@@ -1,4 +0,0 @@
1
- ---
2
- - job:
3
- name: apm-agent-ruby
4
- project-type: folder
@@ -1,24 +0,0 @@
1
- ---
2
-
3
- ##### GLOBAL METADATA
4
-
5
- - meta:
6
- cluster: apm-ci
7
-
8
- ##### JOB DEFAULTS
9
-
10
- - job:
11
- view: APM-CI
12
- project-type: multibranch
13
- logrotate:
14
- daysToKeep: 30
15
- numToKeep: 300
16
- number-to-keep: '100'
17
- days-to-keep: '30'
18
- concurrent: true
19
- node: linux
20
- periodic-folder-trigger: 1w
21
- prune-dead-branches: true
22
- publishers:
23
- - email:
24
- recipients: infra-root+build@elastic.co
data/.ci/linting.groovy DELETED
@@ -1,32 +0,0 @@
1
- #!/usr/bin/env groovy
2
- @Library('apm@current') _
3
-
4
- pipeline {
5
- agent { label 'docker && linux && immutable' }
6
- options {
7
- buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20', daysToKeepStr: '30'))
8
- timestamps()
9
- ansiColor('xterm')
10
- disableResume()
11
- durabilityHint('PERFORMANCE_OPTIMIZED')
12
- rateLimitBuilds(throttle: [count: 60, durationName: 'hour', userBoost: true])
13
- quietPeriod(10)
14
- }
15
- triggers {
16
- issueCommentTrigger('(?i).*(?:jenkins\\W+)?run\\W+(?:the\\W+)?linters(?:\\W+please)?.*')
17
- }
18
- stages {
19
- stage('Sanity checks') {
20
- environment {
21
- HOME = "${env.WORKSPACE}"
22
- PATH = "${env.WORKSPACE}/bin:${env.PATH}"
23
- }
24
- steps {
25
- script {
26
- def sha = getGitCommitSha()
27
- preCommit(commit: "${sha}", junit: true)
28
- }
29
- }
30
- }
31
- }
32
- }
data/.ci/packer_cache.sh DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- source /usr/local/bin/bash_standard_lib.sh
4
-
5
- if [ -x "$(command -v docker)" ]; then
6
- grep "-" .ci/.jenkins_ruby.yml | grep -v 'observability-ci' | cut -d'-' -f2- | \
7
- while read -r version;
8
- do
9
- transformedName=${version/:/-}
10
- transformedVersion=$(echo "${version}" | cut -d":" -f2)
11
- imageName="apm-agent-ruby"
12
- registryImageName="docker.elastic.co/observability-ci/${imageName}:${transformedName}"
13
- (retry 2 docker pull "${registryImageName}")
14
- docker tag "${registryImageName}" "${imageName}:${transformedVersion}"
15
- done
16
- fi
File without changes