Merge "auto: verify and merge jobs"
[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: false
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             - 'odl-netvirt.*'
718       - throttle:
719           max-per-node: 1
720           max-total: 10
721           option: 'project'
722
723     triggers:
724       - timed: '0 12 * * 0'
725
726     builders:
727       - multijob:
728           name: apex-virtual-deploy-test
729           condition: SUCCESSFUL
730           projects:
731             - name: 'apex-virtual-{stream}'
732               current-parameters: true
733               predefined-parameters: |
734                 DEPLOY_SCENARIO=os-odl-{os_scenario}-{topology}
735                 OPNFV_CLEAN=yes
736                 GERRIT_BRANCH=$GERRIT_BRANCH
737                 GERRIT_REFSPEC=$GERRIT_REFSPEC
738                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
739                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
740                 FUNCTEST_SUITE_NAME=tempest_smoke
741                 FUNCTEST_MODE=testcase
742               node-parameters: true
743               kill-phase-on: FAILURE
744               abort-all-job: true
745               git-revision: true
746       - multijob:
747           name: create snapshot
748           condition: SUCCESSFUL
749           projects:
750             - name: 'apex-create-snapshot'
751               current-parameters: true
752               predefined-parameters: |
753                 SNAP_TYPE=csit
754               node-parameters: true
755               kill-phase-on: FAILURE
756               abort-all-job: true
757               git-revision: false
758       - multijob:
759           name: upload snapshot
760           condition: SUCCESSFUL
761           projects:
762             - name: 'apex-upload-snapshot'
763               current-parameters: true
764               predefined-parameters: |
765                 SNAP_TYPE=csit
766               node-parameters: true
767               kill-phase-on: FAILURE
768               abort-all-job: true
769               git-revision: false
770
771 # FDIO promote
772 - job-template:
773     name: 'apex-fdio-promote-daily-{stream}'
774
775     # Job template for promoting CSIT Snapshots
776     #
777     # Required Variables:
778     #     stream:    branch with - in place of / (eg. stable)
779     #     branch:    branch (eg. stable)
780     node: '{virtual-slave}'
781     project-type: 'multijob'
782     disabled: false
783
784     scm:
785       - git-scm
786
787     parameters:
788       - project-parameter:
789           project: '{project}'
790           branch: '{branch}'
791       - apex-parameter:
792           gs-pathname: '{gs-pathname}'
793
794     properties:
795       - build-blocker:
796           use-build-blocker: true
797           block-level: 'NODE'
798           blocking-jobs:
799             - 'apex-verify.*'
800             - 'apex-deploy.*'
801             - 'apex-runner.*'
802             - 'apex-daily.*'
803
804     builders:
805       - multijob:
806           name: build
807           condition: SUCCESSFUL
808           projects:
809             - name: 'apex-build-{stream}'
810               current-parameters: false
811               predefined-parameters: |
812                 GERRIT_BRANCH=$GERRIT_BRANCH
813                 GERRIT_REFSPEC=$GERRIT_REFSPEC
814                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
815                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
816               node-parameters: false
817               kill-phase-on: FAILURE
818               abort-all-job: true
819               git-revision: true
820       - multijob:
821           name: deploy-virtual
822           condition: SUCCESSFUL
823           projects:
824             - name: 'apex-deploy-virtual-{stream}'
825               current-parameters: false
826               predefined-parameters: |
827                 DEPLOY_SCENARIO=os-odl_netvirt-fdio-noha
828                 OPNFV_CLEAN=yes
829                 GERRIT_BRANCH=$GERRIT_BRANCH
830                 GERRIT_REFSPEC=$GERRIT_REFSPEC
831                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
832                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
833                 PROMOTE=True
834               node-parameters: true
835               kill-phase-on: FAILURE
836               abort-all-job: true
837               git-revision: false
838       - multijob:
839           name: create snapshot
840           condition: SUCCESSFUL
841           projects:
842             - name: 'apex-create-snapshot'
843               current-parameters: false
844               predefined-parameters: |
845                 SNAP_TYPE=fdio
846               node-parameters: true
847               kill-phase-on: FAILURE
848               abort-all-job: true
849               git-revision: false
850       - multijob:
851           name: upload snapshot
852           condition: SUCCESSFUL
853           projects:
854             - name: 'apex-upload-snapshot'
855               current-parameters: false
856               predefined-parameters: |
857                 SNAP_TYPE=fdio
858               node-parameters: true
859               kill-phase-on: FAILURE
860               abort-all-job: true
861               git-revision: false
862
863 # Flex job
864 - job-template:
865     name: 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}'
866
867     project-type: 'multijob'
868
869     disabled: false
870
871     node: 'flex-pod2'
872
873     scm:
874       - git-scm
875
876     triggers:
877       - 'apex-{stream}'
878
879     parameters:
880       - '{project}-defaults'
881       - project-parameter:
882           project: '{project}'
883           branch: '{branch}'
884       - apex-parameter:
885           gs-pathname: '{gs-pathname}'
886       - string:
887           name: DEPLOY_SCENARIO
888           default: 'os-nosdn-nofeature-ha'
889           description: "Scenario to deploy with."
890       - string:
891           name: GIT_BASE
892           default: https://gerrit.opnfv.org/gerrit/$PROJECT
893           description: 'Git URL to use on this Jenkins Slave'
894       - string:
895           name: SSH_KEY
896           default: /root/.ssh/id_rsa
897           description: 'SSH key to use for Apex'
898
899     properties:
900       - logrotate-default
901       - build-blocker:
902           use-build-blocker: true
903           block-level: 'NODE'
904           blocking-jobs:
905             - 'apex-verify.*'
906             - 'apex-runner.*'
907             - 'apex-.*-promote.*'
908             - 'apex-run.*'
909             - 'apex-.+-baremetal-.+'
910       - throttle:
911           max-per-node: 1
912           max-total: 10
913           option: 'project'
914
915     builders:
916       - description-setter:
917           description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
918       - multijob:
919           name: 'Baremetal Deploy'
920           condition: SUCCESSFUL
921           projects:
922             - name: 'apex-deploy-baremetal-{stream}'
923               node-parameters: true
924               current-parameters: true
925               predefined-parameters: |
926                 OPNFV_CLEAN=yes
927                 GERRIT_BRANCH=$GERRIT_BRANCH
928                 GERRIT_REFSPEC=
929                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
930               kill-phase-on: FAILURE
931               abort-all-job: true
932               git-revision: false
933       - multijob:
934           name: Yardstick
935           condition: ALWAYS
936           projects:
937             - name: 'yardstick-apex-baremetal-daily-{stream}'
938               node-parameters: true
939               current-parameters: false
940               predefined-parameters:
941                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
942               kill-phase-on: NEVER
943               abort-all-job: false
944               git-revision: false
945
946 # Dovetail Danube test job
947 - job-template:
948     name: 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube'
949
950     project-type: 'multijob'
951
952     node: 'huawei-pod4'
953
954     disabled: false
955
956     parameters:
957       - '{project}-defaults'
958       - project-parameter:
959           project: '{project}'
960           branch: 'stable/danube'
961       - apex-parameter:
962           gs-pathname: '/danube'
963       - string:
964           name: DEPLOY_SCENARIO
965           default: 'os-nosdn-nofeature-ha'
966           description: "Scenario to deploy with."
967
968     properties:
969       - logrotate-default
970       - build-blocker:
971           use-build-blocker: true
972           block-level: 'NODE'
973           blocking-jobs:
974             - 'apex-verify.*'
975             - 'apex-runner.*'
976             - 'apex-.*-promote.*'
977             - 'apex-run.*'
978
979     triggers:
980       - timed: ''  # '0 1 * * *'
981
982     builders:
983       - description-setter:
984           description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
985       - multijob:
986           name: 'Baremetal Deploy'
987           condition: SUCCESSFUL
988           projects:
989             - name: 'apex-deploy-baremetal-danube'
990               node-parameters: true
991               current-parameters: true
992               predefined-parameters: |
993                 OPNFV_CLEAN=yes
994                 GERRIT_BRANCH=$GERRIT_BRANCH
995                 GERRIT_REFSPEC=
996                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
997               kill-phase-on: FAILURE
998               abort-all-job: true
999               git-revision: false
1000       - multijob:
1001           name: Dovetail
1002           condition: ALWAYS
1003           projects:
1004             - name: 'dovetail-apex-baremetal-proposed_tests-danube'
1005               node-parameters: true
1006               current-parameters: false
1007               predefined-parameters:
1008                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
1009               kill-phase-on: NEVER
1010               abort-all-job: false
1011               git-revision: false
1012
1013 ########################
1014 # parameter macros
1015 ########################
1016 - parameter:
1017     name: apex-parameter
1018     parameters:
1019       - string:
1020           name: ARTIFACT_NAME
1021           default: 'latest'
1022           description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact"
1023       - string:
1024           name: ARTIFACT_VERSION
1025           default: 'daily'
1026           description: "Artifact version type"
1027       - string:
1028           name: BUILD_DIRECTORY
1029           default: $WORKSPACE/.build
1030           description: "Directory where the build artifact will be located upon the completion of the build."
1031       - string:
1032           name: CACHE_DIRECTORY
1033           default: $HOME/opnfv/apex-cache{gs-pathname}
1034           description: "Directory where the cache to be used during the build is located."
1035       # yamllint disable rule:line-length
1036       - string:
1037           name: GIT_BASE
1038           default: https://gerrit.opnfv.org/gerrit/$PROJECT
1039           description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
1040       # yamllint enable rule:line-length
1041       - string:
1042           name: GS_PATHNAME
1043           default: '{gs-pathname}'
1044           description: "Version directory where opnfv artifacts are stored in gs repository"
1045       - string:
1046           name: GS_URL
1047           default: $GS_BASE{gs-pathname}
1048           description: "URL to Google Storage."
1049       - string:
1050           name: PROMOTE
1051           default: 'False'
1052           description: "Flag to know if we should promote/upload snapshot artifacts."
1053
1054 ########################
1055 # builder macros
1056 ########################
1057 {% for stream in scenarios %}
1058 # {{ stream }} Builder
1059 - builder:
1060     name: apex-builder-{{ stream }}
1061     builders:
1062       - multijob:
1063           name: Baremetal Deploy and Test Phase
1064           condition: SUCCESSFUL
1065           projects:
1066 {%- for scenario in scenarios[stream] %}
1067             - name: 'apex-{{ scenario }}-baremetal-{{ stream }}'
1068               node-parameters: false
1069               current-parameters: false
1070               predefined-parameters: |
1071                 OPNFV_CLEAN=yes
1072               kill-phase-on: NEVER
1073               abort-all-job: true
1074               git-revision: false
1075 {%- endfor %}
1076 {% endfor -%}
1077
1078 - builder:
1079     name: 'apex-upload-artifact'
1080     builders:
1081       - shell:
1082           !include-raw: ./apex-upload-artifact.sh
1083
1084 - builder:
1085     name: 'apex-download-artifact'
1086     builders:
1087       - shell:
1088           !include-raw: ./apex-download-artifact.sh
1089
1090 - builder:
1091     name: 'apex-deploy'
1092     builders:
1093       - shell:
1094           !include-raw: ./apex-deploy.sh
1095
1096 - builder:
1097     name: 'apex-fetch-logs'
1098     builders:
1099       - shell:
1100           !include-raw: ./apex-fetch-logs.sh
1101
1102 #######################
1103 # trigger macros
1104 ########################
1105 - trigger:
1106     name: 'apex-master'
1107     triggers:
1108       - timed: '0 0 1-31/2 * *'
1109
1110 - trigger:
1111     name: 'apex-fraser'
1112     triggers:
1113       - timed: '0 0 2-30/2 * *'
1114
1115 - trigger:
1116     name: 'apex-euphrates'
1117     triggers:
1118       - timed: '0 0 2-30/2 * *'
1119
1120 - trigger:
1121     name: 'apex-danube'
1122     triggers:
1123       - timed: '0 3 1 1 7'