@@ -34,7 +34,6 @@ pipeline {
34
34
parameters {
35
35
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.' )
36
36
booleanParam(name : ' bench_ci' , defaultValue : true , description : ' Enable benchmarks.' )
37
- booleanParam(name : ' tav_ci' , defaultValue : true , description : ' Enable TAV tests.' )
38
37
booleanParam(name : ' tests_ci' , defaultValue : true , description : ' Enable tests.' )
39
38
}
40
39
stages {
@@ -51,11 +50,6 @@ pipeline {
51
50
stash allowEmpty : true , name : ' source' , useDefaultExcludes : false
52
51
script {
53
52
dir(" ${ BASE_DIR} " ){
54
- def regexps = [
55
- " ^lib/instrumentation/modules/" ,
56
- " ^test/instrumentation/modules/"
57
- ]
58
- env. TAV_UPDATED = isGitRegionMatch(patterns : regexps)
59
53
60
54
// Skip all the stages except docs for PR's with asciidoc or md changes only
61
55
env. ONLY_DOCS = isGitRegionMatch(patterns : [ ' .*\\ .(asciidoc|md)' ], shouldMatchAll : true )
@@ -94,47 +88,6 @@ pipeline {
94
88
}
95
89
}
96
90
}
97
- /**
98
- Run TAV tests.
99
- */
100
- stage(' TAV Test' ) {
101
- options { skipDefaultCheckout() }
102
- environment {
103
- HOME = " ${ env.WORKSPACE} "
104
- }
105
- when {
106
- beforeAgent true
107
- allOf {
108
- not { tag pattern : ' v\\ d+\\ .\\ d+\\ .\\ d+' , comparator : ' REGEXP' }
109
- anyOf {
110
- expression { return params.Run_As_Main_Branch }
111
- triggeredBy ' TimerTrigger'
112
- changeRequest()
113
- expression { return env. TAV_UPDATED != " false" }
114
- }
115
- expression { return params. tav_ci }
116
- expression { return env. ONLY_DOCS == " false" }
117
- }
118
- }
119
- steps {
120
- deleteDir()
121
- unstash ' source'
122
- dir(" ${ BASE_DIR} " ){
123
- script {
124
- def tavContext = getSmartTAVContext()
125
- withGithubNotify(context : tavContext. ghContextName, description : tavContext. ghDescription, tab : ' tests' ) {
126
- def parallelTasks = [:]
127
- tavContext. node[' NODEJS_VERSION' ]. each{ version ->
128
- tavContext. tav[' TAV' ]. each{ tav_item ->
129
- parallelTasks[" Node.js-${ version} -${ tav_item} " ] = generateStep(version : version, tav : tav_item)
130
- }
131
- }
132
- parallel(parallelTasks)
133
- }
134
- }
135
- }
136
- }
137
- }
138
91
139
92
stage(' Release' ) {
140
93
options { skipDefaultCheckout() }
@@ -283,7 +236,6 @@ pipeline {
283
236
284
237
def generateStep (Map params = [:]){
285
238
def version = params?. version
286
- def tav = params. containsKey(' tav' ) ? params. tav : ' '
287
239
def buildType = params. containsKey(' buildType' ) ? params. buildType : ' release'
288
240
def contextManager = params. get(' disableAsyncHooks' , false ) ? ' patch' : ' '
289
241
return {
@@ -296,7 +248,7 @@ def generateStep(Map params = [:]){
296
248
dir(" ${ BASE_DIR} " ){
297
249
try {
298
250
retryWithSleep(retries : 2 , seconds : 5 , backoff : true ) {
299
- sh(label : " Run Tests" , script : """ .ci/scripts/test.sh -b "${ buildType} " -t " ${ tav } " "${ version} " """ )
251
+ sh(label : " Run Tests" , script : """ .ci/scripts/test.sh -b "${ buildType} " "${ version} " """ )
300
252
}
301
253
} finally {
302
254
junit(testResults : " test_output/*.junit.xml" , allowEmptyResults : true , keepLongStdio : true )
@@ -309,54 +261,6 @@ def generateStep(Map params = [:]){
309
261
}
310
262
}
311
263
312
- /**
313
- * Gather the TAV context for the current execution. Then the TAV stage will execute
314
- * the TAV using a smarter approach.
315
- */
316
- def getSmartTAVContext () {
317
- context = [:]
318
- context. ghContextName = ' TAV Test'
319
- context. ghDescription = context. ghContextName
320
- context. node = readYaml(file : ' .ci/.jenkins_tav_nodejs.yml' )
321
-
322
- // Hard to debug what's going on as there are a few nested conditions. Let's then add more verbose output
323
- echo """ \
324
- env.GITHUB_COMMENT=${ env.GITHUB_COMMENT}
325
- params.Run_As_Main_Branch=${ params.Run_As_Main_Branch}
326
- env.CHANGE_ID=${ env.CHANGE_ID}
327
- env.TAV_UPDATED=${ env.TAV_UPDATED} """ . stripIndent()
328
-
329
- if (env. GITHUB_COMMENT ) {
330
- def modules = getModulesFromCommentTrigger(regex : ' run module tests for (.+)' )
331
- if (modules. isEmpty()) {
332
- context. ghDescription = ' TAV Test disabled'
333
- context. tav = readYaml(text : ' TAV:' )
334
- context. node = readYaml(text : ' NODEJS_VERSION:' )
335
- } else {
336
- if (modules. find{ it == ' ALL' }) {
337
- context. tav = readYaml(file : ' .ci/.jenkins_tav.yml' )
338
- } else {
339
- context. ghContextName = ' TAV Test Subset'
340
- context. ghDescription = ' TAV Test comment-triggered'
341
- context. tav = readYaml(text : """ TAV:${ modules.collect{ it.replaceAll('"', '').replaceAll("'", '') }.collect{ "\n - '${it}'"}.join("") } """ )
342
- }
343
- }
344
- } else if (params.Run_As_Main_Branch ) {
345
- context. ghDescription = ' TAV Test param-triggered'
346
- context. tav = readYaml(file : ' .ci/.jenkins_tav.yml' )
347
- } else if (env. CHANGE_ID && env. TAV_UPDATED != " false" ) {
348
- context. ghContextName = ' TAV Test Subset'
349
- context. ghDescription = ' TAV Test changes-triggered'
350
- sh ' .ci/scripts/get_tav.sh .ci/.jenkins_generated_tav.yml'
351
- context. tav = readYaml(file : ' .ci/.jenkins_generated_tav.yml' )
352
- } else {
353
- context. ghDescription = ' TAV Test disabled'
354
- context. tav = readYaml(text : ' TAV:' )
355
- context. node = readYaml(text : ' NODEJS_VERSION:' )
356
- }
357
- return context
358
- }
359
-
360
264
def generateStepForWindows (Map params = [:]){
361
265
def version = params?. version
362
266
def contextManager = params. get(' disableAsyncHooks' , false ) ? ' patch' : ' '
0 commit comments