1aa4e5c30fb7e65072d0d3ec916344832c12c413
[releng.git] / jjb / apex / apex.yaml.j2
1 ---
2 - project:
3     name: 'apex'
4     project: 'apex'
5     jobs:
6       - 'apex-fetch-logs-{stream}'
7       - 'apex-runner-cperf-{stream}'
8       - 'apex-virtual-{stream}'
9       - 'apex-deploy-{platform}-{stream}'
10       - 'apex-daily-{stream}'
11       - 'apex-csit-promote-daily-{stream}-os-{os_version}-{topology}'
12       - 'apex-fdio-promote-daily-{stream}'
13       - 'apex-{scenario}-baremetal-{scenario_stream}'
14       - 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
15       - 'apex-upload-snapshot'
16       - 'apex-create-snapshot'
17       - 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}'
18       - 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube'
19     # stream:    branch with - in place of / (eg. stable-arno)
20     # branch:    branch (eg. stable/arno)
21     stream:
22       - master: &master
23           branch: 'master'
24           gs-pathname: ''
25           build-slave: 'apex-build-master'
26           virtual-slave: 'apex-virtual-master'
27           baremetal-slave: 'apex-baremetal-master'
28           verify-scenario: 'os-nosdn-nofeature-noha'
29           scenario_stream: 'master'
30           disable_daily: false
31           disable_promote: false
32       - fraser: &fraser
33           branch: 'stable/fraser'
34           gs-pathname: '/fraser'
35           build-slave: 'apex-build-master'
36           virtual-slave: 'apex-virtual-master'
37           baremetal-slave: 'apex-baremetal-master'
38           verify-scenario: 'os-nosdn-nofeature-ha'
39           scenario_stream: 'fraser'
40           disable_daily: true
41           disable_promote: true
42       - euphrates: &euphrates
43           branch: 'stable/euphrates'
44           gs-pathname: '/euphrates'
45           build-slave: 'apex-build-master'
46           virtual-slave: 'apex-virtual-master'
47           baremetal-slave: 'apex-baremetal-master'
48           verify-scenario: 'os-odl-nofeature-ha'
49           scenario_stream: 'euphrates'
50           disable_daily: true
51           disable_promote: true
52       - danube: &danube
53           branch: 'stable/danube'
54           gs-pathname: '/danube'
55           build-slave: 'apex-build-danube'
56           virtual-slave: 'apex-virtual-danube'
57           baremetal-slave: 'apex-baremetal-danube'
58           verify-scenario: 'os-odl_l3-nofeature-ha'
59           scenario_stream: 'danube'
60           disabled: true
61           disable_daily: true
62           disable_promote: true
63
64     scenario:
65       {%- for stream in scenarios %}
66       {%- for scenario in scenarios[stream] %}
67       - '{{scenario}}':
68           <<: *{{stream}}
69       {%- endfor %}
70       {%- endfor %}
71
72     platform:
73       - 'baremetal'
74       - 'virtual'
75
76     os_version:
77       - 'pike':
78           os_scenario: 'pike'
79       - 'queens':
80           os_scenario: 'queens'
81       - 'master':
82           os_scenario: 'nofeature'
83
84     topology:
85       - 'noha'
86       - 'ha'
87
88 # Fetch Logs Job
89 - job-template:
90     name: 'apex-fetch-logs-{stream}'
91
92     concurrent: true
93
94     disabled: false
95     scm:
96       - git-scm-gerrit
97     parameters:
98       - project-parameter:
99           project: '{project}'
100           branch: '{branch}'
101       - apex-parameter:
102           gs-pathname: '{gs-pathname}'
103     # yamllint enable rule:line-length
104     properties:
105       - logrotate-default
106       - throttle:
107           max-per-node: 1
108           max-total: 10
109           option: 'project'
110
111     builders:
112       - 'apex-fetch-logs'
113
114 - job-template:
115     name: 'apex-runner-cperf-{stream}'
116
117     # runner cperf job
118     project-type: 'multijob'
119     node: 'intel-pod2'
120
121     disabled: false
122
123     parameters:
124       - apex-parameter:
125           gs-pathname: '{gs-pathname}'
126       - project-parameter:
127           project: '{project}'
128           branch: '{branch}'
129       - string:
130           name: GIT_BASE
131           default: https://gerrit.opnfv.org/gerrit/$PROJECT
132           description: "Used for overriding the GIT URL coming from parameters macro."
133
134     scm:
135       - git-scm
136
137     properties:
138       - logrotate-default
139       - build-blocker:
140           use-build-blocker: false
141           block-level: 'NODE'
142           blocking-jobs:
143             - 'apex-deploy.*'
144       - throttle:
145           max-per-node: 1
146           max-total: 10
147           option: 'project'
148
149     builders:
150       - description-setter:
151           description: "Deployed on $NODE_NAME"
152       - multijob:
153           name: 'Baremetal Deploy'
154           condition: ALWAYS
155           projects:
156             - name: 'apex-deploy-baremetal-{stream}'
157               node-parameters: false
158               current-parameters: true
159               predefined-parameters: |
160                 GERRIT_BRANCH=$GERRIT_BRANCH
161                 GERRIT_REFSPEC=
162                 OPNFV_CLEAN=yes
163                 DEPLOY_SCENARIO={verify-scenario}
164               kill-phase-on: FAILURE
165               abort-all-job: true
166               git-revision: false
167       - multijob:
168           name: CPERF
169           condition: SUCCESSFUL
170           projects:
171             - name: 'cperf-apex-intel-pod2-daily-master'
172               node-parameters: true
173               current-parameters: false
174               predefined-parameters:
175                 DEPLOY_SCENARIO={verify-scenario}
176               kill-phase-on: NEVER
177               abort-all-job: false
178               git-revision: false
179
180 # Deploy job
181 - job-template:
182     name: 'apex-deploy-{platform}-{stream}'
183
184     concurrent: true
185
186     disabled: false
187     quiet-period: 30
188     scm:
189       - git-scm-gerrit
190
191     wrappers:
192       - timeout:
193           timeout: 140
194           fail: true
195
196     parameters:
197       - '{project}-{platform}-{stream}-defaults'
198       - project-parameter:
199           project: '{project}'
200           branch: '{branch}'
201       - apex-parameter:
202           gs-pathname: '{gs-pathname}'
203       - string:
204           name: DEPLOY_SCENARIO
205           default: '{verify-scenario}'
206           description: "Scenario to deploy with."
207       # yamllint disable rule:line-length
208       - string:
209           name: OPNFV_CLEAN
210           default: 'no'
211           description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment"
212
213     # yamllint enable rule:line-length
214     properties:
215       - logrotate-default
216       - build-blocker:
217           use-build-blocker: true
218           block-level: 'NODE'
219           blocking-jobs:
220             - 'apex-deploy.*'
221             - 'functest.*'
222             - 'yardstick.*'
223             - 'dovetail.*'
224             - 'storperf.*'
225             - 'odl-netvirt.*'
226       - throttle:
227           max-per-node: 1
228           max-total: 10
229           option: 'project'
230
231     builders:
232       - description-setter:
233           description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
234       - 'apex-download-artifact'
235       - 'apex-deploy'
236       - 'clean-workspace'
237
238
239 # Virtual Deploy and Test
240 - job-template:
241     name: 'apex-virtual-{stream}'
242
243     project-type: 'multijob'
244
245     concurrent: true
246
247     disabled: false
248
249     scm:
250       - git-scm-gerrit
251
252     parameters:
253       - '{project}-defaults'
254       - '{project}-virtual-{stream}-defaults'
255       - 'functest-suite-parameter'
256       - project-parameter:
257           project: '{project}'
258           branch: '{branch}'
259       - apex-parameter:
260           gs-pathname: '{gs-pathname}'
261       - string:
262           name: DEPLOY_SCENARIO
263           default: '{verify-scenario}'
264           description: "Scenario to deploy with."
265       - string:
266           name: ARTIFACT_VERSION
267           default: dev
268           description: "Used for overriding the ARTIFACT_VERSION"
269
270     properties:
271       - logrotate-default
272       - build-blocker:
273           use-build-blocker: true
274           block-level: 'NODE'
275           blocking-jobs:
276             - 'apex-runner.*'
277             - 'apex-run.*'
278             - 'apex-virtual-.*'
279             - 'apex-verify-gate-.*'
280             - 'odl-netvirt.*'
281       - throttle:
282           max-per-node: 1
283           max-total: 10
284           option: 'project'
285
286     builders:
287       - description-setter:
288           description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
289       - multijob:
290           name: deploy-virtual
291           condition: SUCCESSFUL
292           projects:
293             - name: 'apex-deploy-virtual-{stream}'
294               current-parameters: false
295               predefined-parameters: |
296                 ARTIFACT_VERSION=$ARTIFACT_VERSION
297                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
298                 OPNFV_CLEAN=yes
299                 GERRIT_BRANCH=$GERRIT_BRANCH
300                 GERRIT_REFSPEC=$GERRIT_REFSPEC
301                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
302                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
303                 PROMOTE=$PROMOTE
304               node-parameters: true
305               kill-phase-on: FAILURE
306               abort-all-job: true
307               git-revision: true
308       - shell: |
309           if echo $DEPLOY_SCENARIO | grep queens &> /dev/null; then
310           echo 'REPO=opnfv' > functest_repo
311           else
312           echo 'REPO=ollivier' > functest_repo
313           fi
314       - inject:
315           properties-file: functest_repo
316       - multijob:
317           name: functest-smoke
318           condition: ALWAYS
319           projects:
320             - name: 'functest-apex-virtual-suite-{stream}'
321               current-parameters: false
322               predefined-parameters: |
323                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
324                 FUNCTEST_MODE=$FUNCTEST_MODE
325                 FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
326                 REPO=$REPO
327                 GERRIT_BRANCH=$GERRIT_BRANCH
328                 GERRIT_REFSPEC=$GERRIT_REFSPEC
329                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
330                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
331               node-parameters: true
332               kill-phase-on: NEVER
333               abort-all-job: true
334               git-revision: false
335       - multijob:
336           name: apex-fetch-logs
337           projects:
338             - name: 'apex-fetch-logs-{stream}'
339               current-parameters: false
340               predefined-parameters: |
341                 GERRIT_BRANCH=$GERRIT_BRANCH
342                 GERRIT_REFSPEC=$GERRIT_REFSPEC
343                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
344                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
345               node-parameters: true
346               kill-phase-on: NEVER
347               abort-all-job: true
348               git-revision: false
349
350 # Baremetal Deploy and Test
351 - job-template:
352     name: 'apex-{scenario}-baremetal-{scenario_stream}'
353
354     project-type: 'multijob'
355
356     disabled: false
357
358     scm:
359       - git-scm
360
361     parameters:
362       - '{project}-defaults'
363       - '{project}-baremetal-{scenario_stream}-defaults'
364       - project-parameter:
365           project: '{project}'
366           branch: '{branch}'
367       - apex-parameter:
368           gs-pathname: '{gs-pathname}'
369       - string:
370           name: DEPLOY_SCENARIO
371           default: '{scenario}'
372           description: "Scenario to deploy with."
373
374     properties:
375       - logrotate-default
376       - build-blocker:
377           use-build-blocker: true
378           block-level: 'NODE'
379           blocking-jobs:
380             - 'apex-verify.*'
381             - 'apex-runner.*'
382             - 'apex-.*-promote.*'
383             - 'apex-run.*'
384             - 'apex-.+-baremetal-.+'
385       - throttle:
386           max-per-node: 1
387           max-total: 10
388           option: 'project'
389
390     builders:
391       - description-setter:
392           description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
393       - multijob:
394           name: 'Baremetal Deploy'
395           condition: SUCCESSFUL
396           execution-type: SEQUENTIALLY
397           projects:
398             - name: 'apex-deploy-baremetal-{scenario_stream}'
399               node-parameters: true
400               current-parameters: true
401               predefined-parameters: |
402                 OPNFV_CLEAN=yes
403                 GERRIT_BRANCH=$GERRIT_BRANCH
404                 GERRIT_REFSPEC=
405                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
406               kill-phase-on: NEVER
407               abort-all-job: true
408               git-revision: false
409             - name: 'apex-fetch-logs-{scenario_stream}'
410               current-parameters: true
411               predefined-parameters: |
412                 GERRIT_BRANCH=$GERRIT_BRANCH
413                 GERRIT_REFSPEC=
414               node-parameters: true
415               kill-phase-on: NEVER
416               abort-all-job: true
417               git-revision: false
418       - shell: |
419           if echo $DEPLOY_SCENARIO | grep queens &> /dev/null; then
420             echo 'REPO=opnfv' > functest_properties
421           else
422             echo 'REPO=ollivier' > functest_properties
423           fi
424           features=$(echo $DEPLOY_SCENARIO | sed -r -n 's/os-.+-(.+)-(noha|ha)/\1/p')
425           if [ "$features" == 'queens' ]; then
426             functest_scenario=$(echo $DEPLOY_SCENARIO | sed -r -n 's/(os-.+?)-queens-(noha|ha)/\1-nofeature-\2/p')
427           elif [[ "$features" =~ 'queens' ]]; then
428             functest_scenario=$(echo $DEPLOY_SCENARIO | sed -r -n 's/(os-.+?)-(.+)_queens-(noha|ha)/\1-\2-\3/p')
429           else
430             functest_scenario=$DEPLOY_SCENARIO
431           fi
432           echo "DEPLOY_SCENARIO=$functest_scenario" >> functest_properties
433       - inject:
434           properties-file: functest_properties
435           override-build-parameters: true
436       - multijob:
437           name: 'OPNFV Test Suite'
438           condition: ALWAYS
439           projects:
440             - name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
441               node-parameters: true
442               current-parameters: false
443               predefined-parameters:
444                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
445               kill-phase-on: NEVER
446               abort-all-job: true
447               git-revision: false
448       - multijob:
449           name: apex-fetch-logs
450           projects:
451             - name: 'apex-fetch-logs-{scenario_stream}'
452               current-parameters: true
453               predefined-parameters: |
454                 GERRIT_BRANCH=$GERRIT_BRANCH
455                 GERRIT_REFSPEC=
456               node-parameters: true
457               kill-phase-on: NEVER
458               abort-all-job: true
459               git-revision: false
460     publishers:
461       - groovy-postbuild:
462           script:
463             !include-raw-escape: ./update-build-result.groovy
464
465 # Baremetal test job
466 - job-template:
467     name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
468
469     project-type: 'multijob'
470
471     disabled: false
472
473     parameters:
474       - '{project}-defaults'
475       - '{project}-baremetal-{scenario_stream}-defaults'
476       - project-parameter:
477           project: '{project}'
478           branch: '{branch}'
479       - apex-parameter:
480           gs-pathname: '{gs-pathname}'
481       - string:
482           name: DEPLOY_SCENARIO
483           default: '{scenario}'
484           description: "Scenario to deploy with."
485
486     properties:
487       - logrotate-default
488       - build-blocker:
489           use-build-blocker: true
490           block-level: 'NODE'
491           blocking-jobs:
492             - 'apex-verify.*'
493             - 'apex-runner.*'
494             - 'apex-run.*'
495             - 'apex-testsuite-.+-baremetal-.+'
496       - throttle:
497           max-per-node: 1
498           max-total: 10
499           option: 'project'
500
501     builders:
502       - description-setter:
503           description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
504       - multijob:
505           name: Functest
506           condition: ALWAYS
507           projects:
508             - name: 'functest-apex-baremetal-daily-{scenario_stream}'
509               node-parameters: true
510               current-parameters: false
511               predefined-parameters:
512                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
513               kill-phase-on: NEVER
514               abort-all-job: false
515               git-revision: false
516       - multijob:
517           name: Yardstick
518           condition: ALWAYS
519           projects:
520             - name: 'yardstick-apex-baremetal-daily-{scenario_stream}'
521               node-parameters: true
522               current-parameters: false
523               predefined-parameters:
524                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
525               kill-phase-on: NEVER
526               abort-all-job: false
527               git-revision: false
528       - multijob:
529           name: Dovetail-proposed_tests
530           condition: ALWAYS
531           projects:
532             - name: 'dovetail-apex-baremetal-default-mandatory-{scenario_stream}'
533               node-parameters: true
534               current-parameters: false
535               predefined-parameters:
536                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
537               kill-phase-on: NEVER
538               enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/"
539               abort-all-job: false
540               git-revision: false
541       - multijob:
542           name: Dovetail-default
543           condition: ALWAYS
544           projects:
545             - name: 'dovetail-apex-baremetal-default-optional-{scenario_stream}'
546               node-parameters: true
547               current-parameters: false
548               predefined-parameters:
549                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
550               kill-phase-on: NEVER
551               enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/"
552               abort-all-job: false
553               git-revision: false
554       - multijob:
555           name: StorPerf
556           condition: ALWAYS
557           projects:
558             - name: 'storperf-apex-baremetal-daily-{scenario_stream}'
559               node-parameters: true
560               current-parameters: false
561               predefined-parameters:
562                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
563               enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-nosdn-nofeature-ha/"
564               kill-phase-on: NEVER
565               abort-all-job: false
566               git-revision: false
567 # Build status is always success due conditional plugin prefetching
568 # build status before multijob phases execute
569 #        - conditional-step:
570 #            condition-kind: current-status
571 #            condition-worst: SUCCESS
572 #            condtion-best: SUCCESS
573 #            on-evaluation-failure: mark-unstable
574 #            steps:
575 #                - shell: 'echo "Tests Passed"'
576
577 - job-template:
578     name: 'apex-daily-{stream}'
579
580     # Job template for daily build
581     #
582     # Required Variables:
583     #     stream:    branch with - in place of / (eg. stable)
584     #     branch:    branch (eg. stable)
585     project-type: 'multijob'
586
587     disabled: '{obj:disable_daily}'
588
589     scm:
590       - git-scm
591
592     parameters:
593       - '{project}-defaults'
594       - '{project}-baremetal-{stream}-defaults'
595       - project-parameter:
596           project: '{project}'
597           branch: '{branch}'
598       - apex-parameter:
599           gs-pathname: '{gs-pathname}'
600
601     properties:
602       - logrotate-default
603       - build-blocker:
604           use-build-blocker: true
605           block-level: 'NODE'
606           blocking-jobs:
607             - 'apex-daily.*'
608
609     triggers:
610       - 'apex-{stream}'
611
612     builders:
613       - multijob:
614           name: build
615           condition: SUCCESSFUL
616           projects:
617             - name: 'apex-build-{stream}'
618               current-parameters: false
619               predefined-parameters: |
620                 GERRIT_BRANCH=$GERRIT_BRANCH
621                 GERRIT_REFSPEC=
622                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
623                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
624               node-parameters: true
625               kill-phase-on: FAILURE
626               abort-all-job: true
627               git-revision: true
628       - multijob:
629           name: 'Verify and upload ISO'
630           condition: SUCCESSFUL
631           projects:
632             - name: 'apex-verify-iso-{stream}'
633               current-parameters: false
634               predefined-parameters: |
635                 BUILD_DIRECTORY=$WORKSPACE/../apex-build-{stream}/.build
636                 GERRIT_BRANCH=$GERRIT_BRANCH
637                 GERRIT_REFSPEC=
638                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
639                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
640               node-parameters: true
641               kill-phase-on: FAILURE
642               abort-all-job: true
643               git-revision: true
644       - apex-builder-{stream}
645
646 # snapshot create
647 - job-template:
648     name: 'apex-create-snapshot'
649
650     disabled: false
651
652     parameters:
653       - '{project}-defaults'
654
655     builders:
656       - shell:
657           !include-raw-escape: ./apex-snapshot-create.sh
658
659 # snapshot upload
660 - job-template:
661     name: 'apex-upload-snapshot'
662
663     disabled: false
664
665     parameters:
666       - '{project}-defaults'
667
668     builders:
669       - inject:
670           properties-content: ARTIFACT_TYPE=snapshot
671       - 'apex-upload-artifact'
672
673 # CSIT promote
674 - job-template:
675     name: 'apex-csit-promote-daily-{stream}-os-{os_version}-{topology}'
676
677     # Job template for promoting CSIT Snapshots
678     #
679     # Required Variables:
680     #     stream:    branch with - in place of / (eg. stable)
681     #     branch:    branch (eg. stable)
682     node: '{virtual-slave}'
683     project-type: 'multijob'
684     disabled: '{disable_promote}'
685
686     scm:
687       - git-scm
688
689     parameters:
690       - project-parameter:
691           project: '{project}'
692           branch: '{branch}'
693       - apex-parameter:
694           gs-pathname: '{gs-pathname}'
695       - string:
696           name: ARTIFACT_VERSION
697           default: dev
698           description: "Used for overriding the ARTIFACT_VERSION"
699       - string:
700           name: PROMOTE
701           default: 'True'
702           description: "Used for overriding the PROMOTE"
703       - string:
704           name: GS_URL
705           default: $GS_BASE{gs-pathname}/{os_version}/{topology}
706           description: "User for overriding GS_URL from apex params"
707
708     properties:
709       - build-blocker:
710           use-build-blocker: true
711           block-level: 'NODE'
712           blocking-jobs:
713             - 'apex-verify.*'
714             - 'apex-runner.*'
715             - 'apex-daily.*'
716             - 'apex-csit-promote.*'
717       - throttle:
718           max-per-node: 1
719           max-total: 10
720           option: 'project'
721
722     triggers:
723       - timed: '0 12 * * 0'
724
725     builders:
726       - multijob:
727           name: apex-virtual-deploy-test
728           condition: SUCCESSFUL
729           projects:
730             - name: 'apex-virtual-{stream}'
731               current-parameters: true
732               predefined-parameters: |
733                 DEPLOY_SCENARIO=os-odl-{os_scenario}-{topology}
734                 OPNFV_CLEAN=yes
735                 GERRIT_BRANCH=$GERRIT_BRANCH
736                 GERRIT_REFSPEC=$GERRIT_REFSPEC
737                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
738                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
739                 FUNCTEST_SUITE_NAME=tempest_smoke
740                 FUNCTEST_MODE=testcase
741               node-parameters: true
742               kill-phase-on: FAILURE
743               abort-all-job: true
744               git-revision: true
745       - multijob:
746           name: create snapshot
747           condition: SUCCESSFUL
748           projects:
749             - name: 'apex-create-snapshot'
750               current-parameters: true
751               predefined-parameters: |
752                 SNAP_TYPE=csit
753               node-parameters: true
754               kill-phase-on: FAILURE
755               abort-all-job: true
756               git-revision: false
757       - multijob:
758           name: upload snapshot
759           condition: SUCCESSFUL
760           projects:
761             - name: 'apex-upload-snapshot'
762               current-parameters: true
763               predefined-parameters: |
764                 SNAP_TYPE=csit
765               node-parameters: true
766               kill-phase-on: FAILURE
767               abort-all-job: true
768               git-revision: false
769
770 # FDIO promote
771 - job-template:
772     name: 'apex-fdio-promote-daily-{stream}'
773
774     # Job template for promoting CSIT Snapshots
775     #
776     # Required Variables:
777     #     stream:    branch with - in place of / (eg. stable)
778     #     branch:    branch (eg. stable)
779     node: '{virtual-slave}'
780     project-type: 'multijob'
781     disabled: false
782
783     scm:
784       - git-scm
785
786     parameters:
787       - project-parameter:
788           project: '{project}'
789           branch: '{branch}'
790       - apex-parameter:
791           gs-pathname: '{gs-pathname}'
792
793     properties:
794       - build-blocker:
795           use-build-blocker: true
796           block-level: 'NODE'
797           blocking-jobs:
798             - 'apex-verify.*'
799             - 'apex-deploy.*'
800             - 'apex-runner.*'
801             - 'apex-daily.*'
802
803     builders:
804       - multijob:
805           name: build
806           condition: SUCCESSFUL
807           projects:
808             - name: 'apex-build-{stream}'
809               current-parameters: false
810               predefined-parameters: |
811                 GERRIT_BRANCH=$GERRIT_BRANCH
812                 GERRIT_REFSPEC=$GERRIT_REFSPEC
813                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
814                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
815               node-parameters: false
816               kill-phase-on: FAILURE
817               abort-all-job: true
818               git-revision: true
819       - multijob:
820           name: deploy-virtual
821           condition: SUCCESSFUL
822           projects:
823             - name: 'apex-deploy-virtual-{stream}'
824               current-parameters: false
825               predefined-parameters: |
826                 DEPLOY_SCENARIO=os-odl_netvirt-fdio-noha
827                 OPNFV_CLEAN=yes
828                 GERRIT_BRANCH=$GERRIT_BRANCH
829                 GERRIT_REFSPEC=$GERRIT_REFSPEC
830                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
831                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
832                 PROMOTE=True
833               node-parameters: true
834               kill-phase-on: FAILURE
835               abort-all-job: true
836               git-revision: false
837       - multijob:
838           name: create snapshot
839           condition: SUCCESSFUL
840           projects:
841             - name: 'apex-create-snapshot'
842               current-parameters: false
843               predefined-parameters: |
844                 SNAP_TYPE=fdio
845               node-parameters: true
846               kill-phase-on: FAILURE
847               abort-all-job: true
848               git-revision: false
849       - multijob:
850           name: upload snapshot
851           condition: SUCCESSFUL
852           projects:
853             - name: 'apex-upload-snapshot'
854               current-parameters: false
855               predefined-parameters: |
856                 SNAP_TYPE=fdio
857               node-parameters: true
858               kill-phase-on: FAILURE
859               abort-all-job: true
860               git-revision: false
861
862 # Flex job
863 - job-template:
864     name: 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}'
865
866     project-type: 'multijob'
867
868     disabled: false
869
870     node: 'flex-pod2'
871
872     scm:
873       - git-scm
874
875     triggers:
876       - 'apex-{stream}'
877
878     parameters:
879       - '{project}-defaults'
880       - project-parameter:
881           project: '{project}'
882           branch: '{branch}'
883       - apex-parameter:
884           gs-pathname: '{gs-pathname}'
885       - string:
886           name: DEPLOY_SCENARIO
887           default: 'os-nosdn-nofeature-ha'
888           description: "Scenario to deploy with."
889       - string:
890           name: GIT_BASE
891           default: https://gerrit.opnfv.org/gerrit/$PROJECT
892           description: 'Git URL to use on this Jenkins Slave'
893       - string:
894           name: SSH_KEY
895           default: /root/.ssh/id_rsa
896           description: 'SSH key to use for Apex'
897
898     properties:
899       - logrotate-default
900       - build-blocker:
901           use-build-blocker: true
902           block-level: 'NODE'
903           blocking-jobs:
904             - 'apex-verify.*'
905             - 'apex-runner.*'
906             - 'apex-.*-promote.*'
907             - 'apex-run.*'
908             - 'apex-.+-baremetal-.+'
909       - throttle:
910           max-per-node: 1
911           max-total: 10
912           option: 'project'
913
914     builders:
915       - description-setter:
916           description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
917       - multijob:
918           name: 'Baremetal Deploy'
919           condition: SUCCESSFUL
920           projects:
921             - name: 'apex-deploy-baremetal-{stream}'
922               node-parameters: true
923               current-parameters: true
924               predefined-parameters: |
925                 OPNFV_CLEAN=yes
926                 GERRIT_BRANCH=$GERRIT_BRANCH
927                 GERRIT_REFSPEC=
928                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
929               kill-phase-on: FAILURE
930               abort-all-job: true
931               git-revision: false
932       - multijob:
933           name: Yardstick
934           condition: ALWAYS
935           projects:
936             - name: 'yardstick-apex-baremetal-daily-{stream}'
937               node-parameters: true
938               current-parameters: false
939               predefined-parameters:
940                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
941               kill-phase-on: NEVER
942               abort-all-job: false
943               git-revision: false
944
945 # Dovetail Danube test job
946 - job-template:
947     name: 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube'
948
949     project-type: 'multijob'
950
951     node: 'huawei-pod4'
952
953     disabled: false
954
955     parameters:
956       - '{project}-defaults'
957       - project-parameter:
958           project: '{project}'
959           branch: 'stable/danube'
960       - apex-parameter:
961           gs-pathname: '/danube'
962       - string:
963           name: DEPLOY_SCENARIO
964           default: 'os-nosdn-nofeature-ha'
965           description: "Scenario to deploy with."
966
967     properties:
968       - logrotate-default
969       - build-blocker:
970           use-build-blocker: true
971           block-level: 'NODE'
972           blocking-jobs:
973             - 'apex-verify.*'
974             - 'apex-runner.*'
975             - 'apex-.*-promote.*'
976             - 'apex-run.*'
977
978     triggers:
979       - timed: ''  # '0 1 * * *'
980
981     builders:
982       - description-setter:
983           description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
984       - multijob:
985           name: 'Baremetal Deploy'
986           condition: SUCCESSFUL
987           projects:
988             - name: 'apex-deploy-baremetal-danube'
989               node-parameters: true
990               current-parameters: true
991               predefined-parameters: |
992                 OPNFV_CLEAN=yes
993                 GERRIT_BRANCH=$GERRIT_BRANCH
994                 GERRIT_REFSPEC=
995                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
996               kill-phase-on: FAILURE
997               abort-all-job: true
998               git-revision: false
999       - multijob:
1000           name: Dovetail
1001           condition: ALWAYS
1002           projects:
1003             - name: 'dovetail-apex-baremetal-proposed_tests-danube'
1004               node-parameters: true
1005               current-parameters: false
1006               predefined-parameters:
1007                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
1008               kill-phase-on: NEVER
1009               abort-all-job: false
1010               git-revision: false
1011
1012 ########################
1013 # parameter macros
1014 ########################
1015 - parameter:
1016     name: apex-parameter
1017     parameters:
1018       - string:
1019           name: ARTIFACT_NAME
1020           default: 'latest'
1021           description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact"
1022       - string:
1023           name: ARTIFACT_VERSION
1024           default: 'daily'
1025           description: "Artifact version type"
1026       - string:
1027           name: BUILD_DIRECTORY
1028           default: $WORKSPACE/.build
1029           description: "Directory where the build artifact will be located upon the completion of the build."
1030       - string:
1031           name: CACHE_DIRECTORY
1032           default: $HOME/opnfv/apex-cache{gs-pathname}
1033           description: "Directory where the cache to be used during the build is located."
1034       # yamllint disable rule:line-length
1035       - string:
1036           name: GIT_BASE
1037           default: https://gerrit.opnfv.org/gerrit/$PROJECT
1038           description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
1039       # yamllint enable rule:line-length
1040       - string:
1041           name: GS_PATHNAME
1042           default: '{gs-pathname}'
1043           description: "Version directory where opnfv artifacts are stored in gs repository"
1044       - string:
1045           name: GS_URL
1046           default: $GS_BASE{gs-pathname}
1047           description: "URL to Google Storage."
1048       - string:
1049           name: PROMOTE
1050           default: 'False'
1051           description: "Flag to know if we should promote/upload snapshot artifacts."
1052
1053 ########################
1054 # builder macros
1055 ########################
1056 {% for stream in scenarios %}
1057 # {{ stream }} Builder
1058 - builder:
1059     name: apex-builder-{{ stream }}
1060     builders:
1061       - multijob:
1062           name: Baremetal Deploy and Test Phase
1063           condition: SUCCESSFUL
1064           projects:
1065 {%- for scenario in scenarios[stream] %}
1066             - name: 'apex-{{ scenario }}-baremetal-{{ stream }}'
1067               node-parameters: false
1068               current-parameters: false
1069               predefined-parameters: |
1070                 OPNFV_CLEAN=yes
1071               kill-phase-on: NEVER
1072               abort-all-job: true
1073               git-revision: false
1074 {%- endfor %}
1075 {% endfor -%}
1076
1077 - builder:
1078     name: 'apex-upload-artifact'
1079     builders:
1080       - shell:
1081           !include-raw: ./apex-upload-artifact.sh
1082
1083 - builder:
1084     name: 'apex-download-artifact'
1085     builders:
1086       - shell:
1087           !include-raw: ./apex-download-artifact.sh
1088
1089 - builder:
1090     name: 'apex-deploy'
1091     builders:
1092       - shell:
1093           !include-raw: ./apex-deploy.sh
1094
1095 - builder:
1096     name: 'apex-fetch-logs'
1097     builders:
1098       - shell:
1099           !include-raw: ./apex-fetch-logs.sh
1100
1101 #######################
1102 # trigger macros
1103 ########################
1104 - trigger:
1105     name: 'apex-master'
1106     triggers:
1107       - timed: '0 0 1-31/2 * *'
1108
1109 - trigger:
1110     name: 'apex-fraser'
1111     triggers:
1112       - timed: '0 0 2-30/2 * *'
1113
1114 - trigger:
1115     name: 'apex-euphrates'
1116     triggers:
1117       - timed: '0 0 2-30/2 * *'
1118
1119 - trigger:
1120     name: 'apex-danube'
1121     triggers:
1122       - timed: '0 3 1 1 7'