Skip to content

Commit c0b6fd4

Browse files
committed
libcouchbase: apply timeouts and test order randomization
1 parent 56988ee commit c0b6fd4

File tree

4 files changed

+181
-6
lines changed

4 files changed

+181
-6
lines changed

libcouchbase/Jenkinsfile.erb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ def doIntegrationStages(CLUSTER) {
209209
try {
210210
environment {
211211
LCB_TEST_CLUSTER_CONF="${CLUSTER['<%= server_version %>'].connstr.replaceAll(',', ';')},default,Administrator,password"
212+
GTEST_SHUFFLE=1
212213
}
213214
unstash('centos7_build')
214215
dir('ws_centos7_x64/build') {
@@ -319,6 +320,9 @@ pipeline {
319320
options {
320321
timeout(time: 60, unit: 'MINUTES')
321322
}
323+
environment {
324+
GTEST_SHUFFLE=1
325+
}
322326
post {
323327
failure {
324328
sh('tar cf failure-ws_<%= label %>_x64.tar ws_<%= label %>_x64')
@@ -328,9 +332,6 @@ pipeline {
328332
junit("ws_<%= label %>_x64/build/*.xml")
329333
}
330334
}
331-
environment {
332-
GTEST_SHUFFLE=1
333-
}
334335
steps {
335336
dir('ws_<%= label %>_x64/build') {
336337
sh("ctest ${VERBOSE.toBoolean() ? '-VV' : ''}")
@@ -379,6 +380,9 @@ pipeline {
379380
options {
380381
timeout(time: 60, unit: 'MINUTES')
381382
}
383+
environment {
384+
GTEST_SHUFFLE=1
385+
}
382386
post {
383387
failure {
384388
zip(zipFile: 'failure-ws_win<%= build_id %>.zip', archive: false, dir: 'ws_win<%= build_id %>')
@@ -389,9 +393,6 @@ pipeline {
389393
}
390394
}
391395
steps {
392-
environment {
393-
GTEST_SHUFFLE=1
394-
}
395396
dir('ws_win<%= build_id %>/build') {
396397
bat('cmake --build . --target alltests')
397398
<% if has_ssl %>

libcouchbase/lcb-lnx-scripted-build-pipeline.groovy

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,13 @@ def doIntegrationStages(CLUSTER) {
129129
sh("curl -vv -X POST -u Administrator:password http://${ip}:8091/settings/developerPreview -d 'enabled=true'")
130130
}
131131
stage('test') {
132+
options {
133+
timeout(time: 60, unit: 'MINUTES')
134+
}
132135
try {
133136
environment {
134137
LCB_TEST_CLUSTER_CONF="${CLUSTER['5.5.6'].connstr.replaceAll(',', ';')},default,Administrator,password"
138+
GTEST_SHUFFLE=1
135139
}
136140
unstash('centos7_build')
137141
dir('ws_centos7_x64/build') {
@@ -180,9 +184,13 @@ def doIntegrationStages(CLUSTER) {
180184
sh("curl -vv -X POST -u Administrator:password http://${ip}:8091/settings/developerPreview -d 'enabled=true'")
181185
}
182186
stage('test') {
187+
options {
188+
timeout(time: 60, unit: 'MINUTES')
189+
}
183190
try {
184191
environment {
185192
LCB_TEST_CLUSTER_CONF="${CLUSTER['6.0.4'].connstr.replaceAll(',', ';')},default,Administrator,password"
193+
GTEST_SHUFFLE=1
186194
}
187195
unstash('centos7_build')
188196
dir('ws_centos7_x64/build') {
@@ -231,9 +239,13 @@ def doIntegrationStages(CLUSTER) {
231239
sh("curl -vv -X POST -u Administrator:password http://${ip}:8091/settings/developerPreview -d 'enabled=true'")
232240
}
233241
stage('test') {
242+
options {
243+
timeout(time: 60, unit: 'MINUTES')
244+
}
234245
try {
235246
environment {
236247
LCB_TEST_CLUSTER_CONF="${CLUSTER['6.5.1'].connstr.replaceAll(',', ';')},default,Administrator,password"
248+
GTEST_SHUFFLE=1
237249
}
238250
unstash('centos7_build')
239251
dir('ws_centos7_x64/build') {
@@ -282,9 +294,13 @@ def doIntegrationStages(CLUSTER) {
282294
sh("curl -vv -X POST -u Administrator:password http://${ip}:8091/settings/developerPreview -d 'enabled=true'")
283295
}
284296
stage('test') {
297+
options {
298+
timeout(time: 60, unit: 'MINUTES')
299+
}
285300
try {
286301
environment {
287302
LCB_TEST_CLUSTER_CONF="${CLUSTER['6.5.1_DP'].connstr.replaceAll(',', ';')},default,Administrator,password"
303+
GTEST_SHUFFLE=1
288304
}
289305
unstash('centos7_build')
290306
dir('ws_centos7_x64/build') {
@@ -333,9 +349,13 @@ def doIntegrationStages(CLUSTER) {
333349
sh("curl -vv -X POST -u Administrator:password http://${ip}:8091/settings/developerPreview -d 'enabled=true'")
334350
}
335351
stage('test') {
352+
options {
353+
timeout(time: 60, unit: 'MINUTES')
354+
}
336355
try {
337356
environment {
338357
LCB_TEST_CLUSTER_CONF="${CLUSTER['6.6-stable'].connstr.replaceAll(',', ';')},default,Administrator,password"
358+
GTEST_SHUFFLE=1
339359
}
340360
unstash('centos7_build')
341361
dir('ws_centos7_x64/build') {
@@ -384,9 +404,13 @@ def doIntegrationStages(CLUSTER) {
384404
sh("curl -vv -X POST -u Administrator:password http://${ip}:8091/settings/developerPreview -d 'enabled=true'")
385405
}
386406
stage('test') {
407+
options {
408+
timeout(time: 60, unit: 'MINUTES')
409+
}
387410
try {
388411
environment {
389412
LCB_TEST_CLUSTER_CONF="${CLUSTER['7.0-stable'].connstr.replaceAll(',', ';')},default,Administrator,password"
413+
GTEST_SHUFFLE=1
390414
}
391415
unstash('centos7_build')
392416
dir('ws_centos7_x64/build') {
@@ -483,6 +507,12 @@ pipeline {
483507
}
484508
}
485509
stage('test') {
510+
options {
511+
timeout(time: 60, unit: 'MINUTES')
512+
}
513+
environment {
514+
GTEST_SHUFFLE=1
515+
}
486516
post {
487517
failure {
488518
sh('tar cf failure-ws_debian9_x64.tar ws_debian9_x64')
@@ -530,6 +560,12 @@ pipeline {
530560
}
531561
}
532562
stage('test') {
563+
options {
564+
timeout(time: 60, unit: 'MINUTES')
565+
}
566+
environment {
567+
GTEST_SHUFFLE=1
568+
}
533569
post {
534570
failure {
535571
sh('tar cf failure-ws_centos7_x64.tar ws_centos7_x64')

libcouchbase/lcb-scripted-build-pipeline.groovy

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,13 @@ def doIntegrationStages(CLUSTER) {
129129
sh("curl -vv -X POST -u Administrator:password http://${ip}:8091/settings/developerPreview -d 'enabled=true'")
130130
}
131131
stage('test') {
132+
options {
133+
timeout(time: 60, unit: 'MINUTES')
134+
}
132135
try {
133136
environment {
134137
LCB_TEST_CLUSTER_CONF="${CLUSTER['5.5.6'].connstr.replaceAll(',', ';')},default,Administrator,password"
138+
GTEST_SHUFFLE=1
135139
}
136140
unstash('centos7_build')
137141
dir('ws_centos7_x64/build') {
@@ -180,9 +184,13 @@ def doIntegrationStages(CLUSTER) {
180184
sh("curl -vv -X POST -u Administrator:password http://${ip}:8091/settings/developerPreview -d 'enabled=true'")
181185
}
182186
stage('test') {
187+
options {
188+
timeout(time: 60, unit: 'MINUTES')
189+
}
183190
try {
184191
environment {
185192
LCB_TEST_CLUSTER_CONF="${CLUSTER['6.0.4'].connstr.replaceAll(',', ';')},default,Administrator,password"
193+
GTEST_SHUFFLE=1
186194
}
187195
unstash('centos7_build')
188196
dir('ws_centos7_x64/build') {
@@ -231,9 +239,13 @@ def doIntegrationStages(CLUSTER) {
231239
sh("curl -vv -X POST -u Administrator:password http://${ip}:8091/settings/developerPreview -d 'enabled=true'")
232240
}
233241
stage('test') {
242+
options {
243+
timeout(time: 60, unit: 'MINUTES')
244+
}
234245
try {
235246
environment {
236247
LCB_TEST_CLUSTER_CONF="${CLUSTER['6.5.1'].connstr.replaceAll(',', ';')},default,Administrator,password"
248+
GTEST_SHUFFLE=1
237249
}
238250
unstash('centos7_build')
239251
dir('ws_centos7_x64/build') {
@@ -282,9 +294,13 @@ def doIntegrationStages(CLUSTER) {
282294
sh("curl -vv -X POST -u Administrator:password http://${ip}:8091/settings/developerPreview -d 'enabled=true'")
283295
}
284296
stage('test') {
297+
options {
298+
timeout(time: 60, unit: 'MINUTES')
299+
}
285300
try {
286301
environment {
287302
LCB_TEST_CLUSTER_CONF="${CLUSTER['6.5.1_DP'].connstr.replaceAll(',', ';')},default,Administrator,password"
303+
GTEST_SHUFFLE=1
288304
}
289305
unstash('centos7_build')
290306
dir('ws_centos7_x64/build') {
@@ -333,9 +349,13 @@ def doIntegrationStages(CLUSTER) {
333349
sh("curl -vv -X POST -u Administrator:password http://${ip}:8091/settings/developerPreview -d 'enabled=true'")
334350
}
335351
stage('test') {
352+
options {
353+
timeout(time: 60, unit: 'MINUTES')
354+
}
336355
try {
337356
environment {
338357
LCB_TEST_CLUSTER_CONF="${CLUSTER['6.6-stable'].connstr.replaceAll(',', ';')},default,Administrator,password"
358+
GTEST_SHUFFLE=1
339359
}
340360
unstash('centos7_build')
341361
dir('ws_centos7_x64/build') {
@@ -384,9 +404,13 @@ def doIntegrationStages(CLUSTER) {
384404
sh("curl -vv -X POST -u Administrator:password http://${ip}:8091/settings/developerPreview -d 'enabled=true'")
385405
}
386406
stage('test') {
407+
options {
408+
timeout(time: 60, unit: 'MINUTES')
409+
}
387410
try {
388411
environment {
389412
LCB_TEST_CLUSTER_CONF="${CLUSTER['7.0-stable'].connstr.replaceAll(',', ';')},default,Administrator,password"
413+
GTEST_SHUFFLE=1
390414
}
391415
unstash('centos7_build')
392416
dir('ws_centos7_x64/build') {
@@ -483,6 +507,12 @@ pipeline {
483507
}
484508
}
485509
stage('test') {
510+
options {
511+
timeout(time: 60, unit: 'MINUTES')
512+
}
513+
environment {
514+
GTEST_SHUFFLE=1
515+
}
486516
post {
487517
failure {
488518
sh('tar cf failure-ws_debian9_x64.tar ws_debian9_x64')
@@ -530,6 +560,12 @@ pipeline {
530560
}
531561
}
532562
stage('test') {
563+
options {
564+
timeout(time: 60, unit: 'MINUTES')
565+
}
566+
environment {
567+
GTEST_SHUFFLE=1
568+
}
533569
post {
534570
failure {
535571
sh('tar cf failure-ws_centos7_x64.tar ws_centos7_x64')
@@ -575,6 +611,12 @@ pipeline {
575611
}
576612
}
577613
stage('test') {
614+
options {
615+
timeout(time: 60, unit: 'MINUTES')
616+
}
617+
environment {
618+
GTEST_SHUFFLE=1
619+
}
578620
post {
579621
failure {
580622
zip(zipFile: 'failure-ws_win64_vc14_ssl.zip', archive: false, dir: 'ws_win64_vc14_ssl')
@@ -641,6 +683,12 @@ pipeline {
641683
}
642684
}
643685
stage('test') {
686+
options {
687+
timeout(time: 60, unit: 'MINUTES')
688+
}
689+
environment {
690+
GTEST_SHUFFLE=1
691+
}
644692
post {
645693
failure {
646694
zip(zipFile: 'failure-ws_win64_vc15.zip', archive: false, dir: 'ws_win64_vc15')
@@ -706,6 +754,12 @@ pipeline {
706754
}
707755
}
708756
stage('test') {
757+
options {
758+
timeout(time: 60, unit: 'MINUTES')
759+
}
760+
environment {
761+
GTEST_SHUFFLE=1
762+
}
709763
post {
710764
failure {
711765
zip(zipFile: 'failure-ws_win64_vc15_ssl.zip', archive: false, dir: 'ws_win64_vc15_ssl')

0 commit comments

Comments
 (0)