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