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