@@ -140,25 +140,6 @@ ${status} after ${currentBuild.durationString - ' and counting'}"""
140
140
}
141
141
}
142
142
143
- def submitCIMetrics (buildType ) {
144
- long durationMs = currentBuild. duration
145
- long durationSec = durationMs / 1000
146
- long nowSec = (currentBuild. startTimeInMillis + durationMs) / 1000
147
- def branchNameNoPeriods = env. BRANCH_NAME . replaceAll(' \\ .' , ' _' )
148
- def durationMetric = " okr.ci.java.${ env.DRIVER_METRIC_TYPE} .${ buildType} .${ branchNameNoPeriods} ${ durationSec} ${ nowSec} "
149
-
150
- timeout(time : 1 , unit : ' MINUTES' ) {
151
- withCredentials([string(credentialsId : ' lab-grafana-address' , variable : ' LAB_GRAFANA_ADDRESS' ),
152
- string(credentialsId : ' lab-grafana-port' , variable : ' LAB_GRAFANA_PORT' )]) {
153
- withEnv([" DURATION_METRIC=${ durationMetric} " ]) {
154
- sh label : ' Send runtime metrics to labgrafana' , script : ''' #!/bin/bash -le
155
- echo "${DURATION_METRIC}" | nc -q 5 ${LAB_GRAFANA_ADDRESS} ${LAB_GRAFANA_PORT}
156
- '''
157
- }
158
- }
159
- }
160
- }
161
-
162
143
def describePerCommitStage () {
163
144
script {
164
145
currentBuild. displayName = " Per-Commit build"
@@ -182,7 +163,9 @@ def describeAdhocAndScheduledTestingStage() {
182
163
183
164
// branch pattern for cron
184
165
// should match 3.x, 4.x, 4.5.x, etc
185
- def branchPatternCron = ~" ((\\ d+(\\ .[\\ dx]+)+))"
166
+ def branchPatternCron () {
167
+ ~" ((\\ d+(\\ .[\\ dx]+)+))"
168
+ }
186
169
187
170
pipeline {
188
171
agent none
@@ -327,7 +310,7 @@ pipeline {
327
310
328
311
triggers {
329
312
// schedules only run against release branches (i.e. 3.x, 4.x, 4.5.x, etc.)
330
- parameterizedCron(branchPatternCron. matcher(env. BRANCH_NAME ). matches() ? """
313
+ parameterizedCron(branchPatternCron() . matcher(env. BRANCH_NAME ). matches() ? """
331
314
# Every weeknight (Monday - Friday) around 3:00 AM
332
315
### JDK8 tests against 2.1, 3.0, 3.11 and 4.0
333
316
H 3 * * 1-5 %CI_SCHEDULE=WEEKNIGHTS;CI_SCHEDULE_SERVER_VERSIONS=2.1 3.0 3.11 4.0;CI_SCHEDULE_JABBA_VERSION=1.8;CI_SCHEDULE_TEST_PROFILE=long
@@ -428,11 +411,6 @@ pipeline {
428
411
}
429
412
}
430
413
post {
431
- always {
432
- node(' master' ) {
433
- submitCIMetrics(' commit' )
434
- }
435
- }
436
414
aborted {
437
415
notifySlack(' aborted' )
438
416
}
0 commit comments