elastic-apm 3.5.0 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50ba0e1480f379488014123efe0974b22741593d451f1a501390dd0f8af17be2
4
- data.tar.gz: f448574e08404ef0354998ef7e87173e653ef837309a3114f8694dcae97dbae3
3
+ metadata.gz: e226ecd39fc71213084dffaefbd4343c1d5f5d78a4d8fc91786dca9f5e865533
4
+ data.tar.gz: a0289b4872d55be4132b6982da072844ce71b2a6723877626584c1f5e8d7315f
5
5
  SHA512:
6
- metadata.gz: d7a730f4a97d7c974fa6f8d4acd5f5d5274f552eeeaacf169d2feb27e19b0b8ac1959df2cd8efa7718517cdf7bd1f81ad6e09d3fc57bba1f96d48b5c7572c472
7
- data.tar.gz: 0e695ab76052b342ae71ba7e4eed6a6a03f1368ac67638fbc3a4e8ef2c1558e183d3911eeb38aba296d4ae469f37c4665123f4fe204760ce9f74dcdc238150ee
6
+ metadata.gz: 641923b3afdf3c3fe258053a2f2492092aa1af5a35a50c3783b6e7d0d00e6198f8454c95fb4f2eca0a1ea83f59afd552c600ffaed34efa0aeecf44d40b9948cd
7
+ data.tar.gz: 427eee529da777c98d4c4c02eb79f5aba46200e92edcac1f31b5bbd38df55f78801d92de063c37a54ffecf2fe3777697495c745f8334d3fdae4509626b1e1350
data/.ci/Jenkinsfile CHANGED
@@ -104,158 +104,162 @@ pipeline {
104
104
  testTasks[rubyVersion] = { runJob(rubyVersion, i++) }
105
105
  }
106
106
  parallel(testTasks)
107
- }
108
107
  }
109
108
  }
110
109
  }
111
110
  }
112
- stage('Benchmarks') {
113
- options { skipDefaultCheckout() }
114
- when {
115
- beforeAgent true
116
- allOf {
117
- anyOf {
118
- branch 'master'
119
- branch "\\d+\\.\\d+"
120
- branch "v\\d?"
121
- tag "v\\d+\\.\\d+\\.\\d+*"
122
- expression { return params.Run_As_Master_Branch }
123
- }
124
- expression { return params.bench_ci }
111
+ }
112
+ stage('Integration Tests') {
113
+ agent none
114
+ when {
115
+ beforeAgent true
116
+ anyOf {
117
+ changeRequest()
118
+ expression { return !params.Run_As_Master_Branch }
119
+ }
120
+ }
121
+ steps {
122
+ build(job: env.ITS_PIPELINE, propagate: false, wait: false,
123
+ parameters: [string(name: 'INTEGRATION_TEST', value: 'Ruby'),
124
+ 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}"),
125
+ string(name: 'GITHUB_CHECK_NAME', value: env.GITHUB_CHECK_ITS_NAME),
126
+ string(name: 'GITHUB_CHECK_REPO', value: env.REPO),
127
+ string(name: 'GITHUB_CHECK_SHA1', value: env.GIT_BASE_COMMIT)])
128
+ 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('/','+')}")
129
+ }
130
+ }
131
+ stage('Benchmarks') {
132
+ options { skipDefaultCheckout() }
133
+ when {
134
+ beforeAgent true
135
+ allOf {
136
+ anyOf {
137
+ branch 'master'
138
+ branch "\\d+\\.\\d+"
139
+ branch "v\\d?"
140
+ tag "v\\d+\\.\\d+\\.\\d+*"
141
+ expression { return params.Run_As_Master_Branch }
125
142
  }
143
+ expression { return params.bench_ci }
126
144
  }
127
- stages {
128
- stage('Clean Workspace') {
129
- agent { label 'metal' }
130
- steps {
131
- echo "Cleaning Workspace"
132
- }
133
- post {
134
- always {
135
- cleanWs()
136
- }
145
+ }
146
+ stages {
147
+ stage('Clean Workspace') {
148
+ agent { label 'metal' }
149
+ steps {
150
+ echo "Cleaning Workspace"
151
+ }
152
+ post {
153
+ always {
154
+ cleanWs()
137
155
  }
138
156
  }
139
- /**
140
- Run the benchmarks and store the results on ES.
141
- The result JSON files are also archive into Jenkins.
142
- */
143
- stage('Run Benchmarks') {
144
- steps {
145
- withGithubNotify(context: 'Run Benchmarks') {
146
- deleteDir()
147
- unstash 'source'
148
- dir("${BASE_DIR}"){
149
- script {
150
- def versions = readYaml(file: ".ci/.jenkins_ruby.yml")
151
- def benchmarkTask = [:]
152
- versions['RUBY_VERSION'].each{ v ->
153
- benchmarkTask[v] = runBenchmark(v)
154
- }
155
- parallel(benchmarkTask)
157
+ }
158
+ /**
159
+ Run the benchmarks and store the results on ES.
160
+ The result JSON files are also archive into Jenkins.
161
+ */
162
+ stage('Run Benchmarks') {
163
+ steps {
164
+ withGithubNotify(context: 'Run Benchmarks') {
165
+ deleteDir()
166
+ unstash 'source'
167
+ dir("${BASE_DIR}"){
168
+ script {
169
+ def versions = readYaml(file: ".ci/.jenkins_ruby.yml")
170
+ def benchmarkTask = [:]
171
+ versions['RUBY_VERSION'].each{ v ->
172
+ benchmarkTask[v] = runBenchmark(v)
156
173
  }
174
+ parallel(benchmarkTask)
157
175
  }
158
176
  }
159
177
  }
160
178
  }
161
179
  }
162
180
  }
163
- stage('Populate Downstream failures') {
164
- when {
165
- expression { return rubyTasksFailed }
166
- }
167
- steps {
168
- script {
169
- def message = 'Failures when running the "Test" stage'
170
- if (notifyBuildResult.isAnyDownstreamJobFailedWithTimeout(rubyDownstreamJobs)) {
171
- message += ' related to a timeout issue'
172
- }
173
- error(message)
174
- }
175
- }
181
+ }
182
+ stage('Populate Downstream failures') {
183
+ when {
184
+ expression { return rubyTasksFailed }
176
185
  }
177
- stage('Integration Tests') {
178
- agent none
179
- when {
180
- beforeAgent true
181
- anyOf {
182
- changeRequest()
183
- expression { return !params.Run_As_Master_Branch }
186
+ steps {
187
+ script {
188
+ def message = 'Failures when running the "Test" stage'
189
+ if (notifyBuildResult.isAnyDownstreamJobFailedWithTimeout(rubyDownstreamJobs)) {
190
+ message += ' related to a timeout issue'
184
191
  }
185
- }
186
- steps {
187
- log(level: 'INFO', text: 'Launching Async ITs')
188
- build(job: env.ITS_PIPELINE, propagate: false, wait: false,
189
- parameters: [string(name: 'AGENT_INTEGRATION_TEST', value: 'Ruby'),
190
- 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}"),
191
- string(name: 'GITHUB_CHECK_NAME', value: env.GITHUB_CHECK_ITS_NAME),
192
- string(name: 'GITHUB_CHECK_REPO', value: env.REPO),
193
- string(name: 'GITHUB_CHECK_SHA1', value: env.GIT_BASE_COMMIT)]
194
- )
195
- 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('/','+')}")
192
+ error(message)
196
193
  }
197
194
  }
198
- stage('Release') {
199
- options { skipDefaultCheckout() }
200
- environment {
201
- RUBY_DOCKER_TAG = 'ruby:2.6'
202
- HOME = '/var/lib/jenkins'
203
- }
204
- when {
205
- beforeAgent true
206
- tag pattern: 'v\\d+.*', comparator: 'REGEXP'
195
+ }
196
+ stage('Release') {
197
+ options { skipDefaultCheckout() }
198
+ environment {
199
+ RUBY_DOCKER_TAG = 'ruby:2.6'
200
+ HOME = '/var/lib/jenkins'
201
+ }
202
+ when {
203
+ beforeAgent true
204
+ tag pattern: 'v\\d+.*', comparator: 'REGEXP'
205
+ }
206
+ stages {
207
+ stage('Release') {
208
+ steps {
209
+ deleteDir()
210
+ unstash 'source'
211
+ prepareRelease(){
212
+ sh 'rake release'
213
+ }
214
+ }
207
215
  }
208
- stages {
209
- stage('Release') {
210
- steps {
211
- withGithubNotify(context: 'Release') {
212
- deleteDir()
213
- unstash 'source'
214
- script {
215
- dir(BASE_DIR){
216
- docker.image("${env.RUBY_DOCKER_TAG}").inside('-v ${REFERENCE_REPO}:${REFERENCE_REPO} -v /etc/passwd:/etc/passwd -v ${HOME}/.ssh:${HOME}/.ssh') {
217
- withEnv(["HOME=${env.WORKSPACE}/${env.BASE_DIR ?: ''}"]) {
218
- rubygemsLogin.withApi(secret: "${env.RELEASE_SECRET}") {
219
- sshagent(['f6c7695a-671e-4f4f-a331-acdce44ff9ba']) {
220
- sh '.ci/prepare-git-context.sh'
221
- sh 'gem install rake yard rspec'
222
- sh 'rake release'
223
- }
224
- }
225
- }
226
- }
227
- }
228
- }
216
+ stage('Update Branch') {
217
+ steps {
218
+ deleteDir()
219
+ unstash 'source'
220
+ prepareRelease(){
221
+ catchError(buildResult: 'SUCCESS', message: 'Update branch task failed', stageResult: 'UNSTABLE') {
222
+ sh 'rake release:update_branch'
229
223
  }
230
224
  }
231
225
  }
232
- stage('Opbeans') {
233
- environment {
234
- REPO_NAME = "${OPBEANS_REPO}"
226
+ post {
227
+ unsuccessful {
228
+ emailext subject: "[${env.REPO}] Syncup post-release stage failed.", to: "${NOTIFY_TO}",
229
+ body: "Please go to ${env.BUILD_URL} to review the logs. Most likely you need to update the branch manually."
235
230
  }
236
- steps {
237
- deleteDir()
238
- dir("${OPBEANS_REPO}"){
239
- git credentialsId: 'f6c7695a-671e-4f4f-a331-acdce44ff9ba',
240
- url: "git@github.com:elastic/${OPBEANS_REPO}.git"
241
- // It's required to transform the tag value to the gem version
242
- sh script: ".ci/bump-version.sh ${env.BRANCH_NAME.replaceAll('^v', '')}", label: 'Bump version'
243
- // The opbeans pipeline will trigger a release for the master branch
244
- gitPush()
245
- // The opbeans pipeline will trigger a release for the release tag
246
- gitCreateTag(tag: "${env.BRANCH_NAME}")
247
- }
231
+ }
232
+ }
233
+ stage('Opbeans') {
234
+ environment {
235
+ REPO_NAME = "${OPBEANS_REPO}"
236
+ VERSION = "${env.BRANCH_NAME.replaceAll('^v', '')}"
237
+ }
238
+ steps {
239
+ deleteDir()
240
+ // Let's wait for the Gem to be available
241
+ sh "(retry 10 curl --silent --show-error --fail -I https://rubygems.org/gems/elastic-apm/versions/${env.VERSION})"
242
+ dir("${OPBEANS_REPO}"){
243
+ git credentialsId: 'f6c7695a-671e-4f4f-a331-acdce44ff9ba',
244
+ url: "git@github.com:elastic/${OPBEANS_REPO}.git"
245
+ // It's required to transform the tag value to the gem version
246
+ sh script: ".ci/bump-version.sh ${env.VERSION}", label: 'Bump version'
247
+ // The opbeans pipeline will trigger a release for the master branch
248
+ gitPush()
249
+ // The opbeans pipeline will trigger a release for the release tag
250
+ gitCreateTag(tag: "${env.BRANCH_NAME}")
248
251
  }
249
252
  }
250
253
  }
251
254
  }
252
255
  }
253
- post {
254
- cleanup {
255
- notifyBuildResult(downstreamJobs: rubyDownstreamJobs)
256
- }
256
+ }
257
+ post {
258
+ cleanup {
259
+ notifyBuildResult(downstreamJobs: rubyDownstreamJobs)
257
260
  }
258
261
  }
262
+ }
259
263
 
260
264
  /**
261
265
  Run benchmarks for a Ruby version, then report the results to the Elasticsearch server.
@@ -314,3 +318,19 @@ def runJob(String rubyVersion, int sleep = 1){
314
318
  rubyDownstreamJobs["${rubyVersion}"] = buildObject
315
319
  }
316
320
  }
321
+
322
+ def prepareRelease(Closure body){
323
+ dir("${env.BASE_DIR}"){
324
+ docker.image("${env.RUBY_DOCKER_TAG}").inside('-v ${REFERENCE_REPO}:${REFERENCE_REPO} -v /etc/passwd:/etc/passwd -v ${HOME}/.ssh:${HOME}/.ssh') {
325
+ withEnv(["HOME=${env.WORKSPACE}/${env.BASE_DIR ?: ''}"]) {
326
+ rubygemsLogin.withApi(secret: "${env.RELEASE_SECRET}") {
327
+ sshagent(['f6c7695a-671e-4f4f-a331-acdce44ff9ba']) {
328
+ sh '.ci/prepare-git-context.sh'
329
+ sh 'gem install rake yard rspec'
330
+ body()
331
+ }
332
+ }
333
+ }
334
+ }
335
+ }
336
+ }
@@ -0,0 +1,40 @@
1
+ FROM openjdk:11-jdk
2
+
3
+ RUN apt-get update \
4
+ && apt-get install -y libc6-dev --no-install-recommends \
5
+ && rm -rf /var/lib/apt/lists/*
6
+
7
+ ENV JRUBY_VERSION 9.2.10.0
8
+ ENV JRUBY_SHA256 9199707712c683c525252ccb1de5cb8e75f53b790c5b57a18f6367039ec79553
9
+
10
+ RUN mkdir -p /opt/jruby \
11
+ && curl -fSL https://repo1.maven.org/maven2/org/jruby/jruby-dist/${JRUBY_VERSION}/jruby-dist-${JRUBY_VERSION}-bin.tar.gz -o /tmp/jruby.tar.gz \
12
+ && echo "$JRUBY_SHA256 */tmp/jruby.tar.gz" | sha256sum -c - \
13
+ && tar -zx --strip-components=1 -f /tmp/jruby.tar.gz -C /opt/jruby \
14
+ && update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1
15
+
16
+ # set the jruby binaries in the path
17
+ ENV PATH /opt/jruby/bin:$PATH
18
+
19
+ # skip installing gem documentation
20
+ RUN mkdir -p /opt/jruby/etc \
21
+ && { \
22
+ echo 'install: --no-document'; \
23
+ echo 'update: --no-document'; \
24
+ } >> /opt/jruby/etc/gemrc
25
+
26
+ # install bundler, gem requires bash to work
27
+ RUN gem install bundler rake net-telnet xmlrpc tzinfo-data
28
+
29
+ # install things globally, for great justice
30
+ # and don't create ".bundle" in all our apps
31
+ ENV GEM_HOME /usr/local/bundle
32
+ ENV BUNDLE_PATH="$GEM_HOME" \
33
+ BUNDLE_BIN="$GEM_HOME/bin" \
34
+ BUNDLE_SILENCE_ROOT_WARNING=1 \
35
+ BUNDLE_APP_CONFIG="$GEM_HOME"
36
+ ENV PATH $BUNDLE_BIN:$PATH
37
+ RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \
38
+ && chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
39
+
40
+ CMD [ "irb" ]
@@ -0,0 +1,40 @@
1
+ FROM adoptopenjdk:12-jdk-openj9
2
+
3
+ RUN apt-get update \
4
+ && apt-get install -y libc6-dev git tcc netbase --no-install-recommends \
5
+ && rm -rf /var/lib/apt/lists/*
6
+
7
+ ENV JRUBY_VERSION 9.2.10.0
8
+ ENV JRUBY_SHA256 9199707712c683c525252ccb1de5cb8e75f53b790c5b57a18f6367039ec79553
9
+
10
+ RUN mkdir -p /opt/jruby \
11
+ && curl -fSL https://repo1.maven.org/maven2/org/jruby/jruby-dist/${JRUBY_VERSION}/jruby-dist-${JRUBY_VERSION}-bin.tar.gz -o /tmp/jruby.tar.gz \
12
+ && echo "$JRUBY_SHA256 */tmp/jruby.tar.gz" | sha256sum -c - \
13
+ && tar -zx --strip-components=1 -f /tmp/jruby.tar.gz -C /opt/jruby \
14
+ && update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1
15
+
16
+ # set the jruby binaries in the path
17
+ ENV PATH /opt/jruby/bin:$PATH
18
+
19
+ # skip installing gem documentation
20
+ RUN mkdir -p /opt/jruby/etc \
21
+ && { \
22
+ echo 'install: --no-document'; \
23
+ echo 'update: --no-document'; \
24
+ } >> /opt/jruby/etc/gemrc
25
+
26
+ # install bundler, gem requires bash to work
27
+ RUN gem install bundler rake net-telnet xmlrpc tzinfo-data
28
+
29
+ # install things globally, for great justice
30
+ # and don't create ".bundle" in all our apps
31
+ ENV GEM_HOME /usr/local/bundle
32
+ ENV BUNDLE_PATH="$GEM_HOME" \
33
+ BUNDLE_BIN="$GEM_HOME/bin" \
34
+ BUNDLE_SILENCE_ROOT_WARNING=1 \
35
+ BUNDLE_APP_CONFIG="$GEM_HOME"
36
+ ENV PATH $BUNDLE_BIN:$PATH
37
+ RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \
38
+ && chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
39
+
40
+ CMD [ "irb" ]
@@ -0,0 +1,40 @@
1
+ FROM openjdk:13-jdk-slim
2
+
3
+ RUN apt-get update \
4
+ && apt-get install -y libc6-dev git tcc curl netbase --no-install-recommends \
5
+ && rm -rf /var/lib/apt/lists/*
6
+
7
+ ENV JRUBY_VERSION 9.2.10.0
8
+ ENV JRUBY_SHA256 9199707712c683c525252ccb1de5cb8e75f53b790c5b57a18f6367039ec79553
9
+
10
+ RUN mkdir -p /opt/jruby \
11
+ && curl -fSL https://repo1.maven.org/maven2/org/jruby/jruby-dist/${JRUBY_VERSION}/jruby-dist-${JRUBY_VERSION}-bin.tar.gz -o /tmp/jruby.tar.gz \
12
+ && echo "$JRUBY_SHA256 */tmp/jruby.tar.gz" | sha256sum -c - \
13
+ && tar -zx --strip-components=1 -f /tmp/jruby.tar.gz -C /opt/jruby \
14
+ && update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1
15
+
16
+ # set the jruby binaries in the path
17
+ ENV PATH /opt/jruby/bin:$PATH
18
+
19
+ # skip installing gem documentation
20
+ RUN mkdir -p /opt/jruby/etc \
21
+ && { \
22
+ echo 'install: --no-document'; \
23
+ echo 'update: --no-document'; \
24
+ } >> /opt/jruby/etc/gemrc
25
+
26
+ # install bundler, gem requires bash to work
27
+ RUN gem install bundler rake net-telnet xmlrpc tzinfo-data
28
+
29
+ # install things globally, for great justice
30
+ # and don't create ".bundle" in all our apps
31
+ ENV GEM_HOME /usr/local/bundle
32
+ ENV BUNDLE_PATH="$GEM_HOME" \
33
+ BUNDLE_BIN="$GEM_HOME/bin" \
34
+ BUNDLE_SILENCE_ROOT_WARNING=1 \
35
+ BUNDLE_APP_CONFIG="$GEM_HOME"
36
+ ENV PATH $BUNDLE_BIN:$PATH
37
+ RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \
38
+ && chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
39
+
40
+ CMD [ "irb" ]
@@ -0,0 +1,40 @@
1
+ FROM openjdk:7-jdk
2
+
3
+ RUN apt-get update \
4
+ && apt-get install -y libc6-dev --no-install-recommends \
5
+ && rm -rf /var/lib/apt/lists/*
6
+
7
+ ENV JRUBY_VERSION 9.1.17.0
8
+ ENV JRUBY_SHA256 6a22f7bf8fef1a52530a9c9781a9d374ad07bbbef0d3d8e2af0ff5cbead0dfd5
9
+
10
+ RUN mkdir -p /opt/jruby \
11
+ && curl -fSL https://repo1.maven.org/maven2/org/jruby/jruby-dist/${JRUBY_VERSION}/jruby-dist-${JRUBY_VERSION}-bin.tar.gz -o /tmp/jruby.tar.gz \
12
+ && echo "$JRUBY_SHA256 */tmp/jruby.tar.gz" | sha256sum -c - \
13
+ && tar -zx --strip-components=1 -f /tmp/jruby.tar.gz -C /opt/jruby \
14
+ && update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1
15
+
16
+ # set the jruby binaries in the path
17
+ ENV PATH /opt/jruby/bin:$PATH
18
+
19
+ # skip installing gem documentation
20
+ RUN mkdir -p /opt/jruby/etc \
21
+ && { \
22
+ echo 'install: --no-document'; \
23
+ echo 'update: --no-document'; \
24
+ } >> /opt/jruby/etc/gemrc
25
+
26
+ # install bundler, gem requires bash to work
27
+ RUN gem install bundler rake net-telnet xmlrpc tzinfo-data
28
+
29
+ # install things globally, for great justice
30
+ # and don't create ".bundle" in all our apps
31
+ ENV GEM_HOME /usr/local/bundle
32
+ ENV BUNDLE_PATH="$GEM_HOME" \
33
+ BUNDLE_BIN="$GEM_HOME/bin" \
34
+ BUNDLE_SILENCE_ROOT_WARNING=1 \
35
+ BUNDLE_APP_CONFIG="$GEM_HOME"
36
+ ENV PATH $BUNDLE_BIN:$PATH
37
+ RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \
38
+ && chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
39
+
40
+ CMD [ "irb" ]