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