dream

Форк
0
/
Jenkinsfile 
927 строк · 24.9 Кб
1
#!groovy
2

3
def isPullRequest = env.CHANGE_ID ? true : false
4

5
pipeline {
6

7
  agent {
8
    label 'dream'
9
  }
10
  environment {
11
    WAIT_TIMEOUT=2400
12
    WAIT_INTERVAL=10
13
    COMPOSE_HTTP_TIMEOUT=120
14
  }
15
  stages {
16
    stage('Checkout') {
17
      steps {
18
        script {
19
          def branch = "Current branch is ${env.BRANCH_NAME}"
20
          if (isPullRequest) {
21
            echo """${branch}
22
            Git commiter name: ${env.GIT_AUTHOR_NAME} or ${env.GIT_COMMITTER_NAME}
23
            Pull request: merge ${env.CHANGE_BRANCH} into ${env.CHANGE_TARGET}
24
            Pull request id: ${pullRequest.id} or ${env.CHANGE_ID}
25
            Pull request title: ${pullRequest.title}
26
            Pull request headRef: ${pullRequest.headRef}
27
            Pull request base: ${pullRequest.base}
28
            """
29
          }
30
          else {
31
            echo "${branch}"
32
          }
33
        }
34
      }
35
    }
36
// ------------------------------------------- Test prompted dists------------------------------------------------
37
    stage('Build-DRUXGLM') {
38
      steps {
39
        script{
40
          startTime = currentBuild.duration
41
          Exception ex = null
42
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
43
            try {
44
              sh '''
45
                cat /home/ignatov/secrets.txt >> .env_secret
46
                tests/runtests_dream_ruxglm.sh MODE=build
47
              '''
48
            }
49
            catch (Exception e) {
50
              int duration = (currentBuild.duration - startTime) / 1000
51
              throw e
52
            }
53
          }
54
        }
55
      }
56
      post {
57
        aborted {
58
          script {
59
            sh 'tests/runtests_dream_ruxglm.sh MODE=clean'
60
          }
61
        }
62
        success {
63
          script {
64
            int duration = (currentBuild.duration - startTime) / 1000
65
          }
66
        }
67
      }
68
    }
69
    stage('Start-DRUXGLM') {
70
      steps {
71
        script {
72
          startTime = currentBuild.duration
73
          Exception ex = null
74
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
75
            try {
76
              sh 'tests/runtests_dream_ruxglm.sh MODE=clean && tests/runtests_dream_ruxglm.sh MODE=start'
77
            }
78
            catch (Exception e) {
79
              int duration = (currentBuild.duration - startTime) / 1000
80
              throw e
81
            }
82
          }
83
        }
84
      }
85
      post {
86
        success {
87
          script {
88
            started = true
89
            int duration = (currentBuild.duration - startTime) / 1000
90
          }
91
        }
92
        aborted {
93
          script {
94
            sh 'tests/runtests_dream_ruxglm.sh MODE=clean'
95
          }
96
        }
97
      }
98
    }
99
    stage('Test skills-DRUXGLM') {
100
      steps {
101
        script {
102
          startTime = currentBuild.duration
103
          Exception ex = null
104
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
105
            try {
106
              sh label: 'test skills', script: 'tests/runtests_dream_ruxglm.sh MODE=test_skills'
107
            }
108
            catch (Exception e) {
109
              int duration = (currentBuild.duration - startTime) / 1000
110
              throw e
111
            }
112
          }
113
        }
114
      }
115
      post {
116
        success {
117
          script {
118
            int duration = (currentBuild.duration - startTime) / 1000
119
          }
120
        }
121
        aborted {
122
          script {
123
            sh 'tests/runtests_dream_ruxglm.sh MODE=clean'
124
          }
125
        }
126
      }
127
    }
128
// ------------------------------------------- Test prompted dists------------------------------------------------
129
    stage('Build-Reason') {
130
      steps {
131
        script{
132
          startTime = currentBuild.duration
133
          Exception ex = null
134
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
135
            try {
136
              sh '''
137
                cat /home/ignatov/secrets.txt >> .env_secret
138
                tests/runtests_dream_ruxglm.sh MODE=clean
139
                tests/runtests_reasoning.sh MODE=build
140
              '''
141
            }
142
            catch (Exception e) {
143
              int duration = (currentBuild.duration - startTime) / 1000
144
              throw e
145
            }
146
          }
147
        }
148
      }
149
      post {
150
        aborted {
151
          script {
152
            sh 'tests/runtests_reasoning.sh MODE=clean'
153
          }
154
        }
155
        success {
156
          script {
157
            int duration = (currentBuild.duration - startTime) / 1000
158
          }
159
        }
160
      }
161
    }
162
    stage('Start-Reason') {
163
      steps {
164
        script {
165
          startTime = currentBuild.duration
166
          Exception ex = null
167
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
168
            try {
169
              sh 'tests/runtests_reasoning.sh MODE=clean && tests/runtests_reasoning.sh MODE=start'
170
            }
171
            catch (Exception e) {
172
              int duration = (currentBuild.duration - startTime) / 1000
173
              throw e
174
            }
175
          }
176
        }
177
      }
178
      post {
179
        success {
180
          script {
181
            started = true
182
            int duration = (currentBuild.duration - startTime) / 1000
183
          }
184
        }
185
        aborted {
186
          script {
187
            sh 'tests/runtests_reasoning.sh MODE=clean'
188
          }
189
        }
190
      }
191
    }
192
    stage('Test skills-Reason') {
193
      steps {
194
        script {
195
          startTime = currentBuild.duration
196
          Exception ex = null
197
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
198
            try {
199
              sh label: 'test skills', script: 'tests/runtests_reasoning.sh MODE=test_skills'
200
            }
201
            catch (Exception e) {
202
              int duration = (currentBuild.duration - startTime) / 1000
203
              throw e
204
            }
205
          }
206
        }
207
      }
208
      post {
209
        success {
210
          script {
211
            int duration = (currentBuild.duration - startTime) / 1000
212
          }
213
        }
214
        aborted {
215
          script {
216
            sh 'tests/runtests_reasoning.sh MODE=clean'
217
          }
218
        }
219
      }
220
    }
221
// ------------------------------------------- Test prompted dists------------------------------------------------
222
    stage('Build-MGPT35') {
223
      steps {
224
        script{
225
          startTime = currentBuild.duration
226
          Exception ex = null
227
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
228
            try {
229
              sh '''
230
                cat /home/ignatov/secrets.txt >> .env_secret
231
                tests/runtests_reasoning.sh MODE=clean
232
                tests/runtests_multiskill_davinci3.sh MODE=build
233
              '''
234
            }
235
            catch (Exception e) {
236
              int duration = (currentBuild.duration - startTime) / 1000
237
              throw e
238
            }
239
          }
240
        }
241
      }
242
      post {
243
        aborted {
244
          script {
245
            sh 'tests/runtests_multiskill_davinci3.sh MODE=clean'
246
          }
247
        }
248
        success {
249
          script {
250
            int duration = (currentBuild.duration - startTime) / 1000
251
          }
252
        }
253
      }
254
    }
255
    stage('Start-MGPT35') {
256
      steps {
257
        script {
258
          startTime = currentBuild.duration
259
          Exception ex = null
260
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
261
            try {
262
              sh 'tests/runtests_multiskill_davinci3.sh MODE=clean && tests/runtests_multiskill_davinci3.sh MODE=start'
263
            }
264
            catch (Exception e) {
265
              int duration = (currentBuild.duration - startTime) / 1000
266
              throw e
267
            }
268
          }
269
        }
270
      }
271
      post {
272
        success {
273
          script {
274
            started = true
275
            int duration = (currentBuild.duration - startTime) / 1000
276
          }
277
        }
278
        aborted {
279
          script {
280
            sh 'tests/runtests_multiskill_davinci3.sh MODE=clean'
281
          }
282
        }
283
      }
284
    }
285
    stage('Test skills-MGPT35') {
286
      steps {
287
        script {
288
          startTime = currentBuild.duration
289
          Exception ex = null
290
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
291
            try {
292
              sh label: 'test skills', script: 'tests/runtests_multiskill_davinci3.sh MODE=test_skills'
293
            }
294
            catch (Exception e) {
295
              int duration = (currentBuild.duration - startTime) / 1000
296
              throw e
297
            }
298
          }
299
        }
300
      }
301
      post {
302
        success {
303
          script {
304
            int duration = (currentBuild.duration - startTime) / 1000
305
          }
306
        }
307
        aborted {
308
          script {
309
            sh 'tests/runtests_multiskill_davinci3.sh MODE=clean'
310
          }
311
        }
312
      }
313
    }
314
// ------------------------------------------- Test prompted dists------------------------------------------------
315
    stage('Build-MGPTJT') {
316
      steps {
317
        script{
318
          startTime = currentBuild.duration
319
          Exception ex = null
320
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
321
            try {
322
              sh '''
323
                cat /home/ignatov/secrets.txt >> .env_secret
324
                tests/runtests_multiskill_davinci3.sh MODE=clean
325
                tests/runtests_marketing_gptjt.sh MODE=build
326
              '''
327
            }
328
            catch (Exception e) {
329
              int duration = (currentBuild.duration - startTime) / 1000
330
              throw e
331
            }
332
          }
333
        }
334
      }
335
      post {
336
        aborted {
337
          script {
338
            sh 'tests/runtests_marketing_gptjt.sh MODE=clean'
339
          }
340
        }
341
        success {
342
          script {
343
            int duration = (currentBuild.duration - startTime) / 1000
344
          }
345
        }
346
      }
347
    }
348
    stage('Start-MGPTJT') {
349
      steps {
350
        script {
351
          startTime = currentBuild.duration
352
          Exception ex = null
353
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
354
            try {
355
              sh 'tests/runtests_marketing_gptjt.sh MODE=clean && tests/runtests_marketing_gptjt.sh MODE=start'
356
            }
357
            catch (Exception e) {
358
              int duration = (currentBuild.duration - startTime) / 1000
359
              throw e
360
            }
361
          }
362
        }
363
      }
364
      post {
365
        success {
366
          script {
367
            started = true
368
            int duration = (currentBuild.duration - startTime) / 1000
369
          }
370
        }
371
        aborted {
372
          script {
373
            sh 'tests/runtests_marketing_gptjt.sh MODE=clean'
374
          }
375
        }
376
      }
377
    }
378
    stage('Test skills-MGPTJT') {
379
      steps {
380
        script {
381
          startTime = currentBuild.duration
382
          Exception ex = null
383
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
384
            try {
385
              sh label: 'test skills', script: 'tests/runtests_marketing_gptjt.sh MODE=test_skills'
386
            }
387
            catch (Exception e) {
388
              int duration = (currentBuild.duration - startTime) / 1000
389
              throw e
390
            }
391
          }
392
        }
393
      }
394
      post {
395
        success {
396
          script {
397
            int duration = (currentBuild.duration - startTime) / 1000
398
          }
399
        }
400
        aborted {
401
          script {
402
            sh 'tests/runtests_marketing_gptjt.sh MODE=clean'
403
          }
404
        }
405
      }
406
    }
407
// ------------------------------------------- Test prompted dists------------------------------------------------
408
    stage('Build-DCGPT') {
409
      steps {
410
        script{
411
          startTime = currentBuild.duration
412
          Exception ex = null
413
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
414
            try {
415
              sh '''
416
                cat /home/ignatov/secrets.txt >> .env_secret
417
                tests/runtests_marketing_gptjt.sh MODE=clean
418
                tests/runtests_deeppavlov_chatgpt.sh MODE=build
419
              '''
420
            }
421
            catch (Exception e) {
422
              int duration = (currentBuild.duration - startTime) / 1000
423
              throw e
424
            }
425
          }
426
        }
427
      }
428
      post {
429
        aborted {
430
          script {
431
            sh 'tests/runtests_deeppavlov_chatgpt.sh MODE=clean'
432
          }
433
        }
434
        success {
435
          script {
436
            int duration = (currentBuild.duration - startTime) / 1000
437
          }
438
        }
439
      }
440
    }
441
    stage('Start-DCGPT') {
442
      steps {
443
        script {
444
          startTime = currentBuild.duration
445
          Exception ex = null
446
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
447
            try {
448
              sh 'tests/runtests_deeppavlov_chatgpt.sh MODE=clean && tests/runtests_deeppavlov_chatgpt.sh MODE=start'
449
            }
450
            catch (Exception e) {
451
              int duration = (currentBuild.duration - startTime) / 1000
452
              throw e
453
            }
454
          }
455
        }
456
      }
457
      post {
458
        success {
459
          script {
460
            started = true
461
            int duration = (currentBuild.duration - startTime) / 1000
462
          }
463
        }
464
        aborted {
465
          script {
466
            sh 'tests/runtests_deeppavlov_chatgpt.sh MODE=clean'
467
          }
468
        }
469
      }
470
    }
471
    stage('Test skills-DCGPT') {
472
      steps {
473
        script {
474
          startTime = currentBuild.duration
475
          Exception ex = null
476
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
477
            try {
478
              sh label: 'test skills', script: 'tests/runtests_deeppavlov_chatgpt.sh MODE=test_skills'
479
            }
480
            catch (Exception e) {
481
              int duration = (currentBuild.duration - startTime) / 1000
482
              throw e
483
            }
484
          }
485
        }
486
      }
487
      post {
488
        success {
489
          script {
490
            int duration = (currentBuild.duration - startTime) / 1000
491
          }
492
        }
493
        aborted {
494
          script {
495
            sh 'tests/runtests_deeppavlov_chatgpt.sh MODE=clean'
496
          }
497
        }
498
      }
499
    }
500
// ------------------------------------------- Test prompted dists------------------------------------------------
501
    stage('Build-JRUGPT') {
502
      steps {
503
        script{
504
          startTime = currentBuild.duration
505
          Exception ex = null
506
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
507
            try {
508
              sh '''
509
                cat /home/ignatov/secrets.txt >> .env_secret
510
                tests/runtests_deeppavlov_chatgpt.sh MODE=clean
511
                tests/runtests_journalist_rugpt35.sh MODE=build
512
              '''
513
            }
514
            catch (Exception e) {
515
              int duration = (currentBuild.duration - startTime) / 1000
516
              throw e
517
            }
518
          }
519
        }
520
      }
521
      post {
522
        aborted {
523
          script {
524
            sh 'tests/runtests_journalist_rugpt35.sh MODE=clean'
525
          }
526
        }
527
        success {
528
          script {
529
            int duration = (currentBuild.duration - startTime) / 1000
530
          }
531
        }
532
      }
533
    }
534
    stage('Start-JRUGPT') {
535
      steps {
536
        script {
537
          startTime = currentBuild.duration
538
          Exception ex = null
539
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
540
            try {
541
              sh 'tests/runtests_journalist_rugpt35.sh MODE=clean && tests/runtests_journalist_rugpt35.sh MODE=start'
542
            }
543
            catch (Exception e) {
544
              int duration = (currentBuild.duration - startTime) / 1000
545
              throw e
546
            }
547
          }
548
        }
549
      }
550
      post {
551
        success {
552
          script {
553
            started = true
554
            int duration = (currentBuild.duration - startTime) / 1000
555
          }
556
        }
557
        aborted {
558
          script {
559
            sh 'tests/runtests_journalist_rugpt35.sh MODE=clean'
560
          }
561
        }
562
      }
563
    }
564
    stage('Test skills-JRUGPT') {
565
      steps {
566
        script {
567
          startTime = currentBuild.duration
568
          Exception ex = null
569
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
570
            try {
571
              sh label: 'test skills', script: 'tests/runtests_journalist_rugpt35.sh MODE=test_skills'
572
            }
573
            catch (Exception e) {
574
              int duration = (currentBuild.duration - startTime) / 1000
575
              throw e
576
            }
577
          }
578
        }
579
      }
580
      post {
581
        success {
582
          script {
583
            int duration = (currentBuild.duration - startTime) / 1000
584
          }
585
        }
586
        aborted {
587
          script {
588
            sh 'tests/runtests_journalist_rugpt35.sh MODE=clean'
589
          }
590
        }
591
      }
592
    }
593
// ------------------------------------------- Test dream dist------------------------------------------------
594
    stage('Build-Docs') {
595
      steps {
596
        script{
597
          startTime = currentBuild.duration
598
          Exception ex = null
599
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
600
            try {
601
              sh '''
602
                cat /home/ignatov/secrets.txt >> .env
603
                tests/runtests_journalist_rugpt35.sh MODE=clean
604
                tests/runtests_document_based.sh MODE=build
605
              '''
606
            }
607
            catch (Exception e) {
608
              int duration = (currentBuild.duration - startTime) / 1000
609
              throw e
610
            }
611
          }
612
        }
613
      }
614
      post {
615
        aborted {
616
          script {
617
            sh 'tests/runtests_document_based.sh MODE=clean'
618
          }
619
        }
620
        success {
621
          script {
622
            int duration = (currentBuild.duration - startTime) / 1000
623
          }
624
        }
625
      }
626
    }
627

628
    stage('Start-Docs') {
629
      steps {
630
        script {
631
          startTime = currentBuild.duration
632
          Exception ex = null
633
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
634
            try {
635
              sh 'tests/runtests_document_based.sh MODE=clean && tests/runtests_document_based.sh MODE=start'
636
            }
637
            catch (Exception e) {
638
              int duration = (currentBuild.duration - startTime) / 1000
639
              throw e
640
            }
641
          }
642
        }
643
      }
644
      post {
645
        success {
646
          script {
647
            started = true
648
            int duration = (currentBuild.duration - startTime) / 1000
649
          }
650
        }
651
        aborted {
652
          script {
653
            sh 'tests/runtests_document_based.sh MODE=clean'
654
          }
655
        }
656
      }
657
    }
658

659
    stage('Test skills-Docs') {
660
      steps {
661
        script {
662
          startTime = currentBuild.duration
663
          Exception ex = null
664
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
665
            try {
666
              sh label: 'test skills', script: 'tests/runtests_document_based.sh MODE=test_skills'
667
            }
668
            catch (Exception e) {
669
              int duration = (currentBuild.duration - startTime) / 1000
670
              throw e
671
            }
672
          }
673
        }
674
      }
675
      post {
676
        success {
677
          script {
678
            int duration = (currentBuild.duration - startTime) / 1000
679
          }
680
        }
681
        aborted {
682
          script {
683
            sh 'tests/runtests_document_based.sh MODE=clean'
684
          }
685
        }
686
      }
687
    }
688
// ------------------------------------------- Test dream dist------------------------------------------------
689
    stage('Build') {
690
      steps {
691
        script{
692
          startTime = currentBuild.duration
693
          Exception ex = null
694
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
695
            try {
696
              sh '''
697
                cat /home/ignatov/secrets.txt >> .env
698
                tests/runtests_document_based.sh MODE=clean
699
                tests/runtests.sh MODE=build
700
              '''
701
            }
702
            catch (Exception e) {
703
              int duration = (currentBuild.duration - startTime) / 1000
704
              throw e
705
            }
706
          }
707
        }
708
      }
709
      post {
710
        aborted {
711
          script {
712
            sh 'tests/runtests.sh MODE=clean'
713
          }
714
        }
715
        success {
716
          script {
717
            int duration = (currentBuild.duration - startTime) / 1000
718
          }
719
        }
720
      }
721
    }
722

723
    stage('Start') {
724
      steps {
725
        script {
726
          startTime = currentBuild.duration
727
          Exception ex = null
728
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
729
            try {
730
              sh 'tests/runtests.sh MODE=clean && tests/runtests.sh MODE=start'
731
            }
732
            catch (Exception e) {
733
              int duration = (currentBuild.duration - startTime) / 1000
734
              throw e
735
            }
736
          }
737
        }
738
      }
739
      post {
740
        success {
741
          script {
742
            started = true
743
            int duration = (currentBuild.duration - startTime) / 1000
744
          }
745
        }
746
        aborted {
747
          script {
748
            sh 'tests/runtests.sh MODE=clean'
749
          }
750
        }
751
      }
752
    }
753

754
    stage('Test dialog') {
755
      steps {
756
        script {
757
          startTime = currentBuild.duration
758
          Exception ex = null
759
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
760
            try {
761
              sh 'tests/runtests.sh MODE=test_dialog'
762
            }
763
            catch (Exception e) {
764
              int duration = (currentBuild.duration - startTime) / 1000
765
              throw e
766
            }
767
          }
768
        }
769
      }
770
      post {
771
        success {
772
          script {
773
            int duration = (currentBuild.duration - startTime) / 1000
774
          }
775
        }
776
      }
777
    }
778

779
    stage('Test skills') {
780
      steps {
781
        script {
782
          startTime = currentBuild.duration
783
          Exception ex = null
784
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
785
            try {
786
              sh label: 'test skills', script: 'tests/runtests.sh MODE=test_skills'
787
            }
788
            catch (Exception e) {
789
              int duration = (currentBuild.duration - startTime) / 1000
790
              throw e
791
            }
792
          }
793
        }
794
      }
795
      post {
796
        success {
797
          script {
798
            int duration = (currentBuild.duration - startTime) / 1000
799
          }
800
        }
801
        aborted {
802
          script {
803
            sh 'tests/runtests.sh MODE=clean'
804
          }
805
        }
806
      }
807
    }
808

809
// ------------------------------------------- Test Ru dream dist------------------------------------------------
810
    stage('Build-RU') {
811
      steps {
812
        script{
813
          startTime = currentBuild.duration
814
          Exception ex = null
815
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
816
            try {
817
              sh '''
818
                cat /home/ignatov/secrets.txt >> .env_ru
819
                tests/runtests.sh MODE=clean
820
                tests/runtests_russian.sh MODE=build
821
              '''
822
            }
823
            catch (Exception e) {
824
              int duration = (currentBuild.duration - startTime) / 1000
825
              throw e
826
            }
827
          }
828
        }
829
      }
830
      post {
831
        aborted {
832
          script {
833
            sh 'tests/runtests_russian.sh MODE=clean'
834
          }
835
        }
836
        success {
837
          script {
838
            int duration = (currentBuild.duration - startTime) / 1000
839
          }
840
        }
841
      }
842
    }
843

844
    stage('Start-RU') {
845
      steps {
846
        script {
847
          startTime = currentBuild.duration
848
          Exception ex = null
849
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
850
            try {
851
              sh 'tests/runtests_russian.sh MODE=clean && tests/runtests_russian.sh MODE=start'
852
            }
853
            catch (Exception e) {
854
              int duration = (currentBuild.duration - startTime) / 1000
855
              throw e
856
            }
857
          }
858
        }
859
      }
860
      post {
861
        success {
862
          script {
863
            started = true
864
            int duration = (currentBuild.duration - startTime) / 1000
865
          }
866
        }
867
        aborted {
868
          script {
869
            sh 'tests/runtests_russian.sh MODE=clean'
870
          }
871
        }
872
      }
873
    }
874

875
    stage('Test skills-RU') {
876
      steps {
877
        script {
878
          startTime = currentBuild.duration
879
          Exception ex = null
880
          catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
881
            try {
882
              sh label: 'test skills', script: 'tests/runtests_russian.sh MODE=test_skills'
883
            }
884
            catch (Exception e) {
885
              int duration = (currentBuild.duration - startTime) / 1000
886
              throw e
887
            }
888
          }
889
        }
890
      }
891
      post {
892
        success {
893
          script {
894
            int duration = (currentBuild.duration - startTime) / 1000
895
          }
896
        }
897
        aborted {
898
          script {
899
            sh 'tests/runtests_russian.sh MODE=clean'
900
          }
901
        }
902
      }
903
    }
904

905

906
  }
907
  post {
908
    aborted {
909
      script {
910
        sh 'aborted'
911
      }
912
    }
913
    cleanup {
914
      script {
915
        if (started) {
916
          sh './tests/runtests_multiskill_davinci3.sh MODE=clean'
917
          sh './tests/runtests_marketing_gptjt.sh MODE=clean'
918
          sh './tests/runtests_journalist_rugpt35.sh MODE=clean'
919
          sh './tests/runtests_deeppavlov_chatgpt.sh MODE=clean'
920
          sh './tests/runtests.sh MODE=clean'
921
          sh './tests/runtests_russian.sh MODE=clean'
922
          sh './tests/runtests_multilingual.sh MODE=clean'
923
        }
924
      }
925
    }
926
  }
927
}
928

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.