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