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