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