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