[Dovetail] Increase frequency of Dovetail runs on Apex
[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       - 'functest-suite-parameter'
252       - project-parameter:
253           project: '{project}'
254           branch: '{branch}'
255       - apex-parameter:
256           gs-pathname: '{gs-pathname}'
257       - string:
258           name: DEPLOY_SCENARIO
259           default: '{verify-scenario}'
260           description: "Scenario to deploy with."
261       - string:
262           name: ARTIFACT_VERSION
263           default: dev
264           description: "Used for overriding the ARTIFACT_VERSION"
265
266     properties:
267       - logrotate-default
268       - build-blocker:
269           use-build-blocker: true
270           block-level: 'NODE'
271           blocking-jobs:
272             - 'apex-runner.*'
273             - 'apex-run.*'
274             - 'apex-virtual-.*'
275             - 'apex-verify-gate-.*'
276       - throttle:
277           max-per-node: 1
278           max-total: 10
279           option: 'project'
280
281     builders:
282       - description-setter:
283           description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
284       - multijob:
285           name: deploy-virtual
286           condition: SUCCESSFUL
287           projects:
288             - name: 'apex-deploy-virtual-{stream}'
289               current-parameters: false
290               predefined-parameters: |
291                 ARTIFACT_VERSION=$ARTIFACT_VERSION
292                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
293                 OPNFV_CLEAN=yes
294                 GERRIT_BRANCH=$GERRIT_BRANCH
295                 GERRIT_REFSPEC=$GERRIT_REFSPEC
296                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
297                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
298                 PROMOTE=$PROMOTE
299               node-parameters: true
300               kill-phase-on: FAILURE
301               abort-all-job: true
302               git-revision: true
303       - multijob:
304           name: functest-smoke
305           condition: ALWAYS
306           projects:
307             - name: 'functest-apex-virtual-suite-{stream}'
308               current-parameters: false
309               predefined-parameters: |
310                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
311                 FUNCTEST_MODE=$FUNCTEST_MODE
312                 FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
313                 GERRIT_BRANCH=$GERRIT_BRANCH
314                 GERRIT_REFSPEC=$GERRIT_REFSPEC
315                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
316                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
317               node-parameters: true
318               kill-phase-on: NEVER
319               abort-all-job: true
320               git-revision: false
321       - multijob:
322           name: apex-fetch-logs
323           projects:
324             - name: 'apex-fetch-logs-{stream}'
325               current-parameters: false
326               predefined-parameters: |
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
336 # Baremetal Deploy and Test
337 - job-template:
338     name: 'apex-{scenario}-baremetal-{scenario_stream}'
339
340     project-type: 'multijob'
341
342     disabled: false
343
344     scm:
345       - git-scm
346
347     parameters:
348       - '{project}-defaults'
349       - '{project}-baremetal-{scenario_stream}-defaults'
350       - project-parameter:
351           project: '{project}'
352           branch: '{branch}'
353       - apex-parameter:
354           gs-pathname: '{gs-pathname}'
355       - string:
356           name: DEPLOY_SCENARIO
357           default: '{scenario}'
358           description: "Scenario to deploy with."
359
360     properties:
361       - logrotate-default
362       - build-blocker:
363           use-build-blocker: true
364           block-level: 'NODE'
365           blocking-jobs:
366             - 'apex-verify.*'
367             - 'apex-runner.*'
368             - 'apex-.*-promote.*'
369             - 'apex-run.*'
370             - 'apex-.+-baremetal-.+'
371       - throttle:
372           max-per-node: 1
373           max-total: 10
374           option: 'project'
375
376     builders:
377       - description-setter:
378           description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
379       - multijob:
380           name: 'Baremetal Deploy'
381           condition: SUCCESSFUL
382           execution-type: SEQUENTIALLY
383           projects:
384             - name: 'apex-deploy-baremetal-{scenario_stream}'
385               node-parameters: true
386               current-parameters: true
387               predefined-parameters: |
388                 OPNFV_CLEAN=yes
389                 GERRIT_BRANCH=$GERRIT_BRANCH
390                 GERRIT_REFSPEC=
391                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
392               kill-phase-on: NEVER
393               abort-all-job: true
394               git-revision: false
395             - name: 'apex-fetch-logs-{scenario_stream}'
396               current-parameters: true
397               predefined-parameters: |
398                 GERRIT_BRANCH=$GERRIT_BRANCH
399                 GERRIT_REFSPEC=
400               node-parameters: true
401               kill-phase-on: NEVER
402               abort-all-job: true
403               git-revision: false
404       - multijob:
405           name: 'OPNFV Test Suite'
406           condition: ALWAYS
407           projects:
408             - name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
409               node-parameters: true
410               current-parameters: false
411               predefined-parameters:
412                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
413               kill-phase-on: NEVER
414               abort-all-job: true
415               git-revision: false
416       - multijob:
417           name: apex-fetch-logs
418           projects:
419             - name: 'apex-fetch-logs-{scenario_stream}'
420               current-parameters: true
421               predefined-parameters: |
422                 GERRIT_BRANCH=$GERRIT_BRANCH
423                 GERRIT_REFSPEC=
424               node-parameters: true
425               kill-phase-on: NEVER
426               abort-all-job: true
427               git-revision: false
428     publishers:
429       - groovy-postbuild:
430           script:
431             !include-raw-escape: ./update-build-result.groovy
432
433 # Baremetal test job
434 - job-template:
435     name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
436
437     project-type: 'multijob'
438
439     disabled: false
440
441     parameters:
442       - '{project}-defaults'
443       - '{project}-baremetal-{scenario_stream}-defaults'
444       - project-parameter:
445           project: '{project}'
446           branch: '{branch}'
447       - apex-parameter:
448           gs-pathname: '{gs-pathname}'
449       - string:
450           name: DEPLOY_SCENARIO
451           default: '{scenario}'
452           description: "Scenario to deploy with."
453
454     properties:
455       - logrotate-default
456       - build-blocker:
457           use-build-blocker: true
458           block-level: 'NODE'
459           blocking-jobs:
460             - 'apex-verify.*'
461             - 'apex-runner.*'
462             - 'apex-run.*'
463             - 'apex-testsuite-.+-baremetal-.+'
464       - throttle:
465           max-per-node: 1
466           max-total: 10
467           option: 'project'
468
469     builders:
470       - description-setter:
471           description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
472       - multijob:
473           name: Functest
474           condition: ALWAYS
475           projects:
476             - name: 'functest-apex-baremetal-daily-{scenario_stream}'
477               node-parameters: true
478               current-parameters: false
479               predefined-parameters:
480                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
481               kill-phase-on: NEVER
482               abort-all-job: false
483               git-revision: false
484       - multijob:
485           name: Yardstick
486           condition: ALWAYS
487           projects:
488             - name: 'yardstick-apex-baremetal-daily-{scenario_stream}'
489               node-parameters: true
490               current-parameters: false
491               predefined-parameters:
492                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
493               kill-phase-on: NEVER
494               abort-all-job: false
495               git-revision: false
496       - multijob:
497           name: Dovetail-proposed_tests
498           condition: ALWAYS
499           projects:
500             - name: 'dovetail-apex-baremetal-proposed_tests-{scenario_stream}'
501               node-parameters: true
502               current-parameters: false
503               predefined-parameters:
504                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
505               kill-phase-on: NEVER
506               enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/"
507               abort-all-job: false
508               git-revision: false
509       - multijob:
510           name: Dovetail-default
511           condition: ALWAYS
512           projects:
513             - name: 'dovetail-apex-baremetal-default-{scenario_stream}'
514               node-parameters: true
515               current-parameters: false
516               predefined-parameters:
517                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
518               kill-phase-on: NEVER
519               enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/"
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                 FUNCTEST_SUITE_NAME=tempest_smoke_serial
703                 FUNCTEST_MODE=testcase
704               node-parameters: true
705               kill-phase-on: FAILURE
706               abort-all-job: true
707               git-revision: true
708       - multijob:
709           name: create snapshot
710           condition: SUCCESSFUL
711           projects:
712             - name: 'apex-create-snapshot'
713               current-parameters: false
714               predefined-parameters: |
715                 SNAP_TYPE=csit
716               node-parameters: true
717               kill-phase-on: FAILURE
718               abort-all-job: true
719               git-revision: false
720       - multijob:
721           name: upload snapshot
722           condition: SUCCESSFUL
723           projects:
724             - name: 'apex-upload-snapshot'
725               current-parameters: false
726               predefined-parameters: |
727                 SNAP_TYPE=csit
728               node-parameters: true
729               kill-phase-on: FAILURE
730               abort-all-job: true
731               git-revision: false
732
733 # FDIO promote
734 - job-template:
735     name: 'apex-fdio-promote-daily-{stream}'
736
737     # Job template for promoting CSIT Snapshots
738     #
739     # Required Variables:
740     #     stream:    branch with - in place of / (eg. stable)
741     #     branch:    branch (eg. stable)
742     node: '{virtual-slave}'
743     project-type: 'multijob'
744     disabled: false
745
746     scm:
747       - git-scm
748
749     parameters:
750       - project-parameter:
751           project: '{project}'
752           branch: '{branch}'
753       - apex-parameter:
754           gs-pathname: '{gs-pathname}'
755
756     properties:
757       - build-blocker:
758           use-build-blocker: true
759           block-level: 'NODE'
760           blocking-jobs:
761             - 'apex-verify.*'
762             - 'apex-deploy.*'
763             - 'apex-runner.*'
764             - 'apex-daily.*'
765
766     builders:
767       - multijob:
768           name: build
769           condition: SUCCESSFUL
770           projects:
771             - name: 'apex-build-{stream}'
772               current-parameters: false
773               predefined-parameters: |
774                 GERRIT_BRANCH=$GERRIT_BRANCH
775                 GERRIT_REFSPEC=$GERRIT_REFSPEC
776                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
777                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
778               node-parameters: false
779               kill-phase-on: FAILURE
780               abort-all-job: true
781               git-revision: true
782       - multijob:
783           name: deploy-virtual
784           condition: SUCCESSFUL
785           projects:
786             - name: 'apex-deploy-virtual-{stream}'
787               current-parameters: false
788               predefined-parameters: |
789                 DEPLOY_SCENARIO=os-odl_netvirt-fdio-noha
790                 OPNFV_CLEAN=yes
791                 GERRIT_BRANCH=$GERRIT_BRANCH
792                 GERRIT_REFSPEC=$GERRIT_REFSPEC
793                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
794                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
795                 PROMOTE=True
796               node-parameters: true
797               kill-phase-on: FAILURE
798               abort-all-job: true
799               git-revision: false
800       - multijob:
801           name: create snapshot
802           condition: SUCCESSFUL
803           projects:
804             - name: 'apex-create-snapshot'
805               current-parameters: false
806               predefined-parameters: |
807                 SNAP_TYPE=fdio
808               node-parameters: true
809               kill-phase-on: FAILURE
810               abort-all-job: true
811               git-revision: false
812       - multijob:
813           name: upload snapshot
814           condition: SUCCESSFUL
815           projects:
816             - name: 'apex-upload-snapshot'
817               current-parameters: false
818               predefined-parameters: |
819                 SNAP_TYPE=fdio
820               node-parameters: true
821               kill-phase-on: FAILURE
822               abort-all-job: true
823               git-revision: false
824
825 # Flex job
826 - job-template:
827     name: 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}'
828
829     project-type: 'multijob'
830
831     disabled: false
832
833     node: 'flex-pod2'
834
835     scm:
836       - git-scm
837
838     triggers:
839       - 'apex-{stream}'
840
841     parameters:
842       - '{project}-defaults'
843       - project-parameter:
844           project: '{project}'
845           branch: '{branch}'
846       - apex-parameter:
847           gs-pathname: '{gs-pathname}'
848       - string:
849           name: DEPLOY_SCENARIO
850           default: 'os-nosdn-nofeature-ha'
851           description: "Scenario to deploy with."
852       - string:
853           name: GIT_BASE
854           default: https://gerrit.opnfv.org/gerrit/$PROJECT
855           description: 'Git URL to use on this Jenkins Slave'
856       - string:
857           name: SSH_KEY
858           default: /root/.ssh/id_rsa
859           description: 'SSH key to use for Apex'
860
861     properties:
862       - logrotate-default
863       - build-blocker:
864           use-build-blocker: true
865           block-level: 'NODE'
866           blocking-jobs:
867             - 'apex-verify.*'
868             - 'apex-runner.*'
869             - 'apex-.*-promote.*'
870             - 'apex-run.*'
871             - 'apex-.+-baremetal-.+'
872       - throttle:
873           max-per-node: 1
874           max-total: 10
875           option: 'project'
876
877     builders:
878       - description-setter:
879           description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
880       - multijob:
881           name: 'Baremetal Deploy'
882           condition: SUCCESSFUL
883           projects:
884             - name: 'apex-deploy-baremetal-{stream}'
885               node-parameters: true
886               current-parameters: true
887               predefined-parameters: |
888                 OPNFV_CLEAN=yes
889                 GERRIT_BRANCH=$GERRIT_BRANCH
890                 GERRIT_REFSPEC=
891                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
892               kill-phase-on: FAILURE
893               abort-all-job: true
894               git-revision: false
895       - multijob:
896           name: Yardstick
897           condition: ALWAYS
898           projects:
899             - name: 'yardstick-apex-baremetal-daily-{stream}'
900               node-parameters: true
901               current-parameters: false
902               predefined-parameters:
903                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
904               kill-phase-on: NEVER
905               abort-all-job: false
906               git-revision: false
907
908 # Dovetail Danube test job
909 - job-template:
910     name: 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube'
911
912     project-type: 'multijob'
913
914     node: 'huawei-pod4'
915
916     disabled: false
917
918     parameters:
919       - '{project}-defaults'
920       - project-parameter:
921           project: '{project}'
922           branch: 'stable/danube'
923       - apex-parameter:
924           gs-pathname: '/danube'
925       - string:
926           name: DEPLOY_SCENARIO
927           default: 'os-nosdn-nofeature-ha'
928           description: "Scenario to deploy with."
929
930     properties:
931       - logrotate-default
932       - build-blocker:
933           use-build-blocker: true
934           block-level: 'NODE'
935           blocking-jobs:
936             - 'apex-verify.*'
937             - 'apex-runner.*'
938             - 'apex-.*-promote.*'
939             - 'apex-run.*'
940
941     triggers:
942       - timed: ''  # '0 1 * * *'
943
944     builders:
945       - description-setter:
946           description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
947       - multijob:
948           name: 'Baremetal Deploy'
949           condition: SUCCESSFUL
950           projects:
951             - name: 'apex-deploy-baremetal-danube'
952               node-parameters: true
953               current-parameters: true
954               predefined-parameters: |
955                 OPNFV_CLEAN=yes
956                 GERRIT_BRANCH=$GERRIT_BRANCH
957                 GERRIT_REFSPEC=
958                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
959               kill-phase-on: FAILURE
960               abort-all-job: true
961               git-revision: false
962       - multijob:
963           name: Dovetail
964           condition: ALWAYS
965           projects:
966             - name: 'dovetail-apex-baremetal-proposed_tests-danube'
967               node-parameters: true
968               current-parameters: false
969               predefined-parameters:
970                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
971               kill-phase-on: NEVER
972               abort-all-job: false
973               git-revision: false
974
975 ########################
976 # parameter macros
977 ########################
978 - parameter:
979     name: apex-parameter
980     parameters:
981       - string:
982           name: ARTIFACT_NAME
983           default: 'latest'
984           description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact"
985       - string:
986           name: ARTIFACT_VERSION
987           default: 'daily'
988           description: "Artifact version type"
989       - string:
990           name: BUILD_DIRECTORY
991           default: $WORKSPACE/.build
992           description: "Directory where the build artifact will be located upon the completion of the build."
993       - string:
994           name: CACHE_DIRECTORY
995           default: $HOME/opnfv/apex-cache{gs-pathname}
996           description: "Directory where the cache to be used during the build is located."
997       # yamllint disable rule:line-length
998       - string:
999           name: GIT_BASE
1000           default: https://gerrit.opnfv.org/gerrit/$PROJECT
1001           description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
1002       # yamllint enable rule:line-length
1003       - string:
1004           name: GS_PATHNAME
1005           default: '{gs-pathname}'
1006           description: "Version directory where opnfv artifacts are stored in gs repository"
1007       - string:
1008           name: GS_URL
1009           default: $GS_BASE{gs-pathname}
1010           description: "URL to Google Storage."
1011       - string:
1012           name: PROMOTE
1013           default: 'False'
1014           description: "Flag to know if we should promote/upload snapshot artifacts."
1015
1016 ########################
1017 # builder macros
1018 ########################
1019 {% for stream in scenarios %}
1020 # {{ stream }} Builder
1021 - builder:
1022     name: apex-builder-{{ stream }}
1023     builders:
1024       - multijob:
1025           name: Baremetal Deploy and Test Phase
1026           condition: SUCCESSFUL
1027           projects:
1028 {%- for scenario in scenarios[stream] %}
1029             - name: 'apex-{{ scenario }}-baremetal-{{ stream }}'
1030               node-parameters: false
1031               current-parameters: false
1032               predefined-parameters: |
1033                 OPNFV_CLEAN=yes
1034               kill-phase-on: NEVER
1035               abort-all-job: true
1036               git-revision: false
1037 {%- endfor %}
1038 {% endfor -%}
1039
1040 - builder:
1041     name: 'apex-upload-artifact'
1042     builders:
1043       - shell:
1044           !include-raw: ./apex-upload-artifact.sh
1045
1046 - builder:
1047     name: 'apex-download-artifact'
1048     builders:
1049       - shell:
1050           !include-raw: ./apex-download-artifact.sh
1051
1052 - builder:
1053     name: 'apex-deploy'
1054     builders:
1055       - shell:
1056           !include-raw: ./apex-deploy.sh
1057
1058 - builder:
1059     name: 'apex-fetch-logs'
1060     builders:
1061       - shell:
1062           !include-raw: ./apex-fetch-logs.sh
1063
1064 #######################
1065 # trigger macros
1066 ########################
1067 - trigger:
1068     name: 'apex-master'
1069     triggers:
1070       - timed: '0 0 1-31/2 * *'
1071
1072 - trigger:
1073     name: 'apex-fraser'
1074     triggers:
1075       - timed: '0 0 2-30/2 * *'
1076
1077 - trigger:
1078     name: 'apex-euphrates'
1079     triggers:
1080       - timed: '0 0 2-30/2 * *'
1081
1082 - trigger:
1083     name: 'apex-danube'
1084     triggers:
1085       - timed: '0 3 1 1 7'
1086