Merge "Bugfix: Change http_pass to proxy_pass"
[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_SUITE_NAME=healthcheck
374                   GERRIT_BRANCH=$GERRIT_BRANCH
375                   GERRIT_REFSPEC=$GERRIT_REFSPEC
376                   GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
377                   GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
378                 node-parameters: true
379                 kill-phase-on: NEVER
380                 abort-all-job: true
381                 git-revision: false
382
383 - job-template:
384     name: 'apex-runner-cperf-{stream}'
385
386     # runner cperf job
387     project-type: 'multijob'
388     node: 'intel-pod2'
389
390     disabled: false
391
392     parameters:
393         - apex-parameter:
394             gs-pathname: '{gs-pathname}'
395         - project-parameter:
396             project: '{project}'
397             branch: '{branch}'
398         - string:
399             name: GIT_BASE
400             default: https://gerrit.opnfv.org/gerrit/$PROJECT
401             description: "Used for overriding the GIT URL coming from parameters macro."
402
403     scm:
404         - git-scm
405
406     properties:
407         - logrotate-default
408         - build-blocker:
409             use-build-blocker: false
410             block-level: 'NODE'
411             blocking-jobs:
412                 - 'apex-deploy.*'
413         - throttle:
414             max-per-node: 1
415             max-total: 10
416             option: 'project'
417
418     builders:
419         - description-setter:
420             description: "Deployed on $NODE_NAME"
421         - multijob:
422             name: 'Baremetal Deploy'
423             condition: ALWAYS
424             projects:
425                 - name: 'apex-deploy-baremetal-{stream}'
426                   node-parameters: false
427                   current-parameters: true
428                   predefined-parameters: |
429                     GERRIT_BRANCH=$GERRIT_BRANCH
430                     GERRIT_REFSPEC=
431                     OPNFV_CLEAN=yes
432                     DEPLOY_SCENARIO={verify-scenario}
433                   kill-phase-on: FAILURE
434                   abort-all-job: true
435                   git-revision: false
436         - multijob:
437             name: CPERF
438             condition: SUCCESSFUL
439             projects:
440                 - name: 'cperf-apex-intel-pod2-daily-master'
441                   node-parameters: true
442                   current-parameters: false
443                   predefined-parameters:
444                     DEPLOY_SCENARIO={verify-scenario}
445                   kill-phase-on: NEVER
446                   abort-all-job: false
447                   git-revision: false
448
449 # Deploy job
450 - job-template:
451     name: 'apex-deploy-{platform}-{stream}'
452
453     node: 'apex-{platform}-{stream}'
454
455     concurrent: true
456
457     disabled: false
458     quiet-period: 30
459     scm:
460         - git-scm-gerrit
461
462     wrappers:
463         - timeout:
464             timeout: 140
465             fail: true
466
467     parameters:
468         - '{project}-{platform}-{stream}-defaults'
469         - project-parameter:
470             project: '{project}'
471             branch: '{branch}'
472         - apex-parameter:
473             gs-pathname: '{gs-pathname}'
474         - string:
475             name: DEPLOY_SCENARIO
476             default: '{verify-scenario}'
477             description: "Scenario to deploy with."
478         - string:
479             name: OPNFV_CLEAN
480             default: 'no'
481             description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment"
482
483     properties:
484         - logrotate-default
485         - build-blocker:
486             use-build-blocker: true
487             block-level: 'NODE'
488             blocking-jobs:
489                 - 'apex-deploy.*'
490                 - 'functest.*'
491                 - 'yardstick.*'
492                 - 'dovetail.*'
493                 - 'storperf.*'
494         - throttle:
495             max-per-node: 1
496             max-total: 10
497             option: 'project'
498
499     builders:
500         - description-setter:
501             description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
502         - 'apex-download-artifact'
503         - 'apex-deploy'
504         - 'clean-workspace'
505
506
507 # Virtual Deploy and Test
508 - job-template:
509     name: 'apex-virtual-{stream}'
510
511     project-type: 'multijob'
512
513     disabled: false
514
515     scm:
516         - git-scm-gerrit
517
518     parameters:
519         - '{project}-defaults'
520         - '{project}-virtual-{stream}-defaults'
521         - project-parameter:
522             project: '{project}'
523             branch: '{branch}'
524         - apex-parameter:
525             gs-pathname: '{gs-pathname}'
526         - string:
527             name: DEPLOY_SCENARIO
528             default: '{verify-scenario}'
529             description: "Scenario to deploy with."
530         - string:
531             name: ARTIFACT_VERSION
532             default: dev
533             description: "Used for overriding the ARTIFACT_VERSION"
534     properties:
535         - logrotate-default
536         - build-blocker:
537             use-build-blocker: true
538             block-level: 'NODE'
539             blocking-jobs:
540                 - 'apex-runner.*'
541                 - 'apex-.*-promote.*'
542                 - 'apex-run.*'
543                 - 'apex-virtual-.*'
544                 - 'apex-verify-gate-.*'
545         - throttle:
546             max-per-node: 1
547             max-total: 10
548             option: 'project'
549     builders:
550         - description-setter:
551             description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
552         - multijob:
553             name: deploy-virtual
554             condition: SUCCESSFUL
555             projects:
556                 - name: 'apex-deploy-virtual-{stream}'
557                   current-parameters: false
558                   predefined-parameters: |
559                     ARTIFACT_VERSION=$ARTIFACT_VERSION
560                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
561                     OPNFV_CLEAN=yes
562                     GERRIT_BRANCH=$GERRIT_BRANCH
563                     GERRIT_REFSPEC=$GERRIT_REFSPEC
564                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
565                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
566                   node-parameters: true
567                   kill-phase-on: FAILURE
568                   abort-all-job: true
569                   git-revision: true
570         - multijob:
571             name: functest-smoke
572             condition: SUCCESSFUL
573             projects:
574               - name: 'functest-apex-virtual-suite-{stream}'
575                 current-parameters: false
576                 predefined-parameters: |
577                   DEPLOY_SCENARIO=$DEPLOY_SCENARIO
578                   FUNCTEST_SUITE_NAME=healthcheck
579                   GERRIT_BRANCH=$GERRIT_BRANCH
580                   GERRIT_REFSPEC=$GERRIT_REFSPEC
581                   GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
582                   GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
583                 node-parameters: true
584                 kill-phase-on: NEVER
585                 abort-all-job: true
586                 git-revision: false
587
588 # Baremetal Deploy and Test
589 - job-template:
590     name: 'apex-{scenario}-baremetal-{scenario_stream}'
591
592     project-type: 'multijob'
593
594     disabled: false
595
596     scm:
597         - git-scm
598
599     parameters:
600         - '{project}-defaults'
601         - '{project}-baremetal-{scenario_stream}-defaults'
602         - project-parameter:
603             project: '{project}'
604             branch: '{branch}'
605         - apex-parameter:
606             gs-pathname: '{gs-pathname}'
607         - string:
608             name: DEPLOY_SCENARIO
609             default: '{scenario}'
610             description: "Scenario to deploy with."
611     properties:
612         - logrotate-default
613         - build-blocker:
614             use-build-blocker: true
615             block-level: 'NODE'
616             blocking-jobs:
617                 - 'apex-verify.*'
618                 - 'apex-runner.*'
619                 - 'apex-.*-promote.*'
620                 - 'apex-run.*'
621                 - 'apex-.+-baremetal-.+'
622         - throttle:
623             max-per-node: 1
624             max-total: 10
625             option: 'project'
626     builders:
627         - description-setter:
628             description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
629         - multijob:
630             name: 'Baremetal Deploy'
631             condition: SUCCESSFUL
632             projects:
633                 - name: 'apex-deploy-baremetal-{scenario_stream}'
634                   node-parameters: true
635                   current-parameters: true
636                   predefined-parameters: |
637                     OPNFV_CLEAN=yes
638                     GERRIT_BRANCH=$GERRIT_BRANCH
639                     GERRIT_REFSPEC=
640                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
641                   kill-phase-on: FAILURE
642                   abort-all-job: true
643                   git-revision: false
644         - multijob:
645             name: 'OPNFV Test Suite'
646             projects:
647                 - name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
648                   node-parameters: true
649                   current-parameters: false
650                   predefined-parameters:
651                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
652                   kill-phase-on: NEVER
653                   abort-all-job: true
654                   git-revision: false
655
656     publishers:
657         - groovy-postbuild:
658             script:
659                 !include-raw-escape: ./update-build-result.groovy
660
661 # Baremetal test job
662 - job-template:
663     name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
664
665     project-type: 'multijob'
666
667     disabled: false
668
669     parameters:
670         - '{project}-defaults'
671         - '{project}-baremetal-{scenario_stream}-defaults'
672         - project-parameter:
673             project: '{project}'
674             branch: '{branch}'
675         - apex-parameter:
676             gs-pathname: '{gs-pathname}'
677         - string:
678             name: DEPLOY_SCENARIO
679             default: '{scenario}'
680             description: "Scenario to deploy with."
681     properties:
682         - logrotate-default
683         - build-blocker:
684             use-build-blocker: true
685             block-level: 'NODE'
686             blocking-jobs:
687                 - 'apex-verify.*'
688                 - 'apex-runner.*'
689                 - 'apex-.*-promote.*'
690                 - 'apex-run.*'
691                 - 'apex-testsuite-.+-baremetal-.+'
692         - throttle:
693             max-per-node: 1
694             max-total: 10
695             option: 'project'
696     builders:
697         - description-setter:
698             description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
699         - multijob:
700             name: Functest
701             condition: ALWAYS
702             projects:
703                 - name: 'functest-apex-baremetal-daily-{scenario_stream}'
704                   node-parameters: true
705                   current-parameters: false
706                   predefined-parameters:
707                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
708                   kill-phase-on: NEVER
709                   abort-all-job: false
710                   git-revision: false
711         - multijob:
712             name: Yardstick
713             condition: ALWAYS
714             projects:
715                 - name: 'yardstick-apex-baremetal-daily-{scenario_stream}'
716                   node-parameters: true
717                   current-parameters: false
718                   predefined-parameters:
719                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
720                   kill-phase-on: NEVER
721                   abort-all-job: false
722                   git-revision: false
723         - multijob:
724             name: Dovetail
725             condition: ALWAYS
726             projects:
727                 - name: 'dovetail-apex-baremetal-proposed_tests-{scenario_stream}'
728                   node-parameters: true
729                   current-parameters: false
730                   predefined-parameters:
731                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
732                   kill-phase-on: NEVER
733                   enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|nosdn-kvm|odl_l3-fdio)-ha/"
734                   abort-all-job: false
735                   git-revision: false
736         - multijob:
737             name: StorPerf
738             condition: ALWAYS
739             projects:
740                 - name: 'storperf-apex-baremetal-daily-{scenario_stream}'
741                   node-parameters: true
742                   current-parameters: false
743                   predefined-parameters:
744                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
745                   enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-nosdn-nofeature-ha/"
746                   kill-phase-on: NEVER
747                   abort-all-job: false
748                   git-revision: false
749 # Build status is always success due conditional plugin prefetching
750 # build status before multijob phases execute
751 #        - conditional-step:
752 #            condition-kind: current-status
753 #            condition-worst: SUCCESS
754 #            condtion-best: SUCCESS
755 #            on-evaluation-failure: mark-unstable
756 #            steps:
757 #                - shell: 'echo "Tests Passed"'
758
759 - job-template:
760     name: 'apex-daily-{stream}'
761
762     # Job template for daily build
763     #
764     # Required Variables:
765     #     stream:    branch with - in place of / (eg. stable)
766     #     branch:    branch (eg. stable)
767     project-type: 'multijob'
768
769     node: '{baremetal-slave}'
770
771     disabled: false
772
773     scm:
774         - git-scm
775
776     parameters:
777         - '{project}-defaults'
778         - '{project}-baremetal-{stream}-defaults'
779         - project-parameter:
780             project: '{project}'
781             branch: '{branch}'
782         - apex-parameter:
783             gs-pathname: '{gs-pathname}'
784
785     properties:
786         - logrotate-default
787
788     triggers:
789         - 'apex-{stream}'
790
791     builders:
792         - multijob:
793             name: build
794             condition: SUCCESSFUL
795             projects:
796                 - name: 'apex-build-{stream}'
797                   current-parameters: false
798                   predefined-parameters: |
799                     GERRIT_BRANCH=$GERRIT_BRANCH
800                     GERRIT_REFSPEC=
801                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
802                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
803                   node-parameters: true
804                   kill-phase-on: FAILURE
805                   abort-all-job: true
806                   git-revision: true
807         - multijob:
808             name: 'Verify and upload ISO'
809             condition: SUCCESSFUL
810             projects:
811                 - name: 'apex-verify-iso-{stream}'
812                   current-parameters: false
813                   predefined-parameters: |
814                     BUILD_DIRECTORY=$WORKSPACE/../apex-build-{stream}/.build
815                     GERRIT_BRANCH=$GERRIT_BRANCH
816                     GERRIT_REFSPEC=
817                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
818                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
819                   node-parameters: true
820                   kill-phase-on: FAILURE
821                   abort-all-job: true
822                   git-revision: true
823         - apex-builder-{stream}
824
825 # snapshot create
826 - job-template:
827     name: 'apex-create-snapshot'
828
829     # Job template for clean
830     #
831     # Required Variables:
832     #     stream:    branch with - in place of / (eg. stable)
833
834     disabled: false
835
836     builders:
837         - shell:
838             !include-raw-escape: ./apex-snapshot-create.sh
839
840 # snapshot upload
841 - job-template:
842     name: 'apex-upload-snapshot'
843
844     # Job template for clean
845     #
846     # Required Variables:
847     #     stream:    branch with - in place of / (eg. stable)
848
849     disabled: false
850
851     builders:
852         - inject:
853            properties-content: ARTIFACT_TYPE=snapshot
854         - 'apex-upload-artifact'
855
856 # CSIT promote
857 - job-template:
858     name: 'apex-csit-promote-daily-{stream}'
859
860     # Job template for promoting CSIT Snapshots
861     #
862     # Required Variables:
863     #     stream:    branch with - in place of / (eg. stable)
864     #     branch:    branch (eg. stable)
865     node: '{virtual-slave}'
866     project-type: 'multijob'
867     disabled: false
868
869     scm:
870         - git-scm
871
872     parameters:
873         - project-parameter:
874             project: '{project}'
875             branch: '{branch}'
876         - apex-parameter:
877             gs-pathname: '{gs-pathname}'
878
879     properties:
880         - build-blocker:
881             use-build-blocker: true
882             block-level: 'NODE'
883             blocking-jobs:
884                 - 'apex-verify.*'
885                 - 'apex-deploy.*'
886                 - 'apex-runner.*'
887                 - 'apex-daily.*'
888
889     triggers:
890         - timed: '0 12 * * 0'
891
892     builders:
893         - multijob:
894             name: build
895             condition: SUCCESSFUL
896             projects:
897                 - name: 'apex-build-{stream}'
898                   current-parameters: false
899                   predefined-parameters: |
900                     GERRIT_BRANCH=$GERRIT_BRANCH
901                     GERRIT_REFSPEC=$GERRIT_REFSPEC
902                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
903                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
904                   node-parameters: false
905                   kill-phase-on: FAILURE
906                   abort-all-job: true
907                   git-revision: true
908         - multijob:
909             name: deploy-virtual
910             condition: SUCCESSFUL
911             projects:
912                 - name: 'apex-deploy-virtual-{stream}'
913                   current-parameters: false
914                   predefined-parameters: |
915                     DEPLOY_SCENARIO=os-odl_l3-csit-noha
916                     OPNFV_CLEAN=yes
917                     GERRIT_BRANCH=$GERRIT_BRANCH
918                     GERRIT_REFSPEC=$GERRIT_REFSPEC
919                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
920                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
921                     PROMOTE=True
922                   node-parameters: true
923                   kill-phase-on: FAILURE
924                   abort-all-job: true
925                   git-revision: false
926         - multijob:
927             name: functest-smoke
928             condition: SUCCESSFUL
929             projects:
930               - name: 'functest-apex-virtual-suite-{stream}'
931                 current-parameters: false
932                 predefined-parameters: |
933                   DEPLOY_SCENARIO=os-odl_l3-nofeature-noha
934                   FUNCTEST_SUITE_NAME=tempest_smoke_serial
935                   GERRIT_BRANCH=$GERRIT_BRANCH
936                   GERRIT_REFSPEC=$GERRIT_REFSPEC
937                   GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
938                   GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
939                 node-parameters: true
940                 kill-phase-on: FAILURE
941                 abort-all-job: true
942                 git-revision: false
943         - multijob:
944             name: create snapshot
945             condition: SUCCESSFUL
946             projects:
947               - name: 'apex-create-snapshot'
948                 current-parameters: false
949                 predefined-parameters: |
950                   SNAP_TYPE=csit
951                 node-parameters: true
952                 kill-phase-on: FAILURE
953                 abort-all-job: true
954                 git-revision: false
955         - multijob:
956             name: upload snapshot
957             condition: SUCCESSFUL
958             projects:
959               - name: 'apex-upload-snapshot'
960                 current-parameters: false
961                 predefined-parameters: |
962                   SNAP_TYPE=csit
963                 node-parameters: true
964                 kill-phase-on: FAILURE
965                 abort-all-job: true
966                 git-revision: false
967
968 # FDIO promote
969 - job-template:
970     name: 'apex-fdio-promote-daily-{stream}'
971
972     # Job template for promoting CSIT Snapshots
973     #
974     # Required Variables:
975     #     stream:    branch with - in place of / (eg. stable)
976     #     branch:    branch (eg. stable)
977     node: '{virtual-slave}'
978     project-type: 'multijob'
979     disabled: false
980
981     scm:
982         - git-scm
983
984     parameters:
985         - project-parameter:
986             project: '{project}'
987             branch: '{branch}'
988         - apex-parameter:
989             gs-pathname: '{gs-pathname}'
990
991     properties:
992         - build-blocker:
993             use-build-blocker: true
994             block-level: 'NODE'
995             blocking-jobs:
996                 - 'apex-verify.*'
997                 - 'apex-deploy.*'
998                 - 'apex-runner.*'
999                 - 'apex-daily.*'
1000
1001     builders:
1002         - multijob:
1003             name: build
1004             condition: SUCCESSFUL
1005             projects:
1006                 - name: 'apex-build-{stream}'
1007                   current-parameters: false
1008                   predefined-parameters: |
1009                     GERRIT_BRANCH=$GERRIT_BRANCH
1010                     GERRIT_REFSPEC=$GERRIT_REFSPEC
1011                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
1012                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
1013                   node-parameters: false
1014                   kill-phase-on: FAILURE
1015                   abort-all-job: true
1016                   git-revision: true
1017         - multijob:
1018             name: deploy-virtual
1019             condition: SUCCESSFUL
1020             projects:
1021                 - name: 'apex-deploy-virtual-{stream}'
1022                   current-parameters: false
1023                   predefined-parameters: |
1024                     DEPLOY_SCENARIO=os-odl_netvirt-fdio-noha
1025                     OPNFV_CLEAN=yes
1026                     GERRIT_BRANCH=$GERRIT_BRANCH
1027                     GERRIT_REFSPEC=$GERRIT_REFSPEC
1028                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
1029                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
1030                     PROMOTE=True
1031                   node-parameters: true
1032                   kill-phase-on: FAILURE
1033                   abort-all-job: true
1034                   git-revision: false
1035         - multijob:
1036             name: create snapshot
1037             condition: SUCCESSFUL
1038             projects:
1039               - name: 'apex-create-snapshot'
1040                 current-parameters: false
1041                 predefined-parameters: |
1042                   SNAP_TYPE=fdio
1043                 node-parameters: true
1044                 kill-phase-on: FAILURE
1045                 abort-all-job: true
1046                 git-revision: false
1047         - multijob:
1048             name: upload snapshot
1049             condition: SUCCESSFUL
1050             projects:
1051               - name: 'apex-upload-snapshot'
1052                 current-parameters: false
1053                 predefined-parameters: |
1054                   SNAP_TYPE=fdio
1055                 node-parameters: true
1056                 kill-phase-on: FAILURE
1057                 abort-all-job: true
1058                 git-revision: false
1059
1060 # Flex job
1061 - job-template:
1062     name: 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}'
1063
1064     project-type: 'multijob'
1065
1066     disabled: false
1067
1068     node: 'flex-pod2'
1069
1070     scm:
1071         - git-scm
1072     triggers:
1073         - 'apex-{stream}'
1074     parameters:
1075         - '{project}-defaults'
1076         - project-parameter:
1077             project: '{project}'
1078             branch: '{branch}'
1079         - apex-parameter:
1080             gs-pathname: '{gs-pathname}'
1081         - string:
1082             name: DEPLOY_SCENARIO
1083             default: 'os-nosdn-nofeature-ha'
1084             description: "Scenario to deploy with."
1085         - string:
1086             name: GIT_BASE
1087             default: https://gerrit.opnfv.org/gerrit/$PROJECT
1088             description: 'Git URL to use on this Jenkins Slave'
1089         - string:
1090             name: SSH_KEY
1091             default: /root/.ssh/id_rsa
1092             description: 'SSH key to use for Apex'
1093     properties:
1094         - logrotate-default
1095         - build-blocker:
1096             use-build-blocker: true
1097             block-level: 'NODE'
1098             blocking-jobs:
1099                 - 'apex-verify.*'
1100                 - 'apex-runner.*'
1101                 - 'apex-.*-promote.*'
1102                 - 'apex-run.*'
1103                 - 'apex-.+-baremetal-.+'
1104         - throttle:
1105             max-per-node: 1
1106             max-total: 10
1107             option: 'project'
1108     builders:
1109         - description-setter:
1110             description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
1111         - multijob:
1112             name: 'Baremetal Deploy'
1113             condition: SUCCESSFUL
1114             projects:
1115                 - name: 'apex-deploy-baremetal-{stream}'
1116                   node-parameters: true
1117                   current-parameters: true
1118                   predefined-parameters: |
1119                     OPNFV_CLEAN=yes
1120                     GERRIT_BRANCH=$GERRIT_BRANCH
1121                     GERRIT_REFSPEC=
1122                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
1123                   kill-phase-on: FAILURE
1124                   abort-all-job: true
1125                   git-revision: false
1126         - multijob:
1127             name: Yardstick
1128             condition: ALWAYS
1129             projects:
1130                 - name: 'yardstick-apex-baremetal-daily-{stream}'
1131                   node-parameters: true
1132                   current-parameters: false
1133                   predefined-parameters:
1134                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
1135                   kill-phase-on: NEVER
1136                   abort-all-job: false
1137                   git-revision: false
1138
1139 # Dovetail Danube test job
1140 - job-template:
1141     name: 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube'
1142
1143     project-type: 'multijob'
1144
1145     node: 'huawei-pod4'
1146
1147     disabled: false
1148
1149     parameters:
1150         - '{project}-defaults'
1151         - project-parameter:
1152             project: '{project}'
1153             branch: 'stable/danube'
1154         - apex-parameter:
1155             gs-pathname: '/danube'
1156         - string:
1157             name: DEPLOY_SCENARIO
1158             default: 'os-nosdn-nofeature-ha'
1159             description: "Scenario to deploy with."
1160
1161     properties:
1162         - logrotate-default
1163         - build-blocker:
1164             use-build-blocker: true
1165             block-level: 'NODE'
1166             blocking-jobs:
1167                 - 'apex-verify.*'
1168                 - 'apex-runner.*'
1169                 - 'apex-.*-promote.*'
1170                 - 'apex-run.*'
1171
1172     triggers:
1173         - timed: '0 1 * * *'
1174
1175     builders:
1176         - description-setter:
1177             description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
1178         - multijob:
1179             name: 'Baremetal Deploy'
1180             condition: SUCCESSFUL
1181             projects:
1182                 - name: 'apex-deploy-baremetal-danube'
1183                   node-parameters: true
1184                   current-parameters: true
1185                   predefined-parameters: |
1186                     OPNFV_CLEAN=yes
1187                     GERRIT_BRANCH=$GERRIT_BRANCH
1188                     GERRIT_REFSPEC=
1189                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
1190                   kill-phase-on: FAILURE
1191                   abort-all-job: true
1192                   git-revision: false
1193         - multijob:
1194             name: Dovetail
1195             condition: ALWAYS
1196             projects:
1197                 - name: 'dovetail-apex-baremetal-proposed_tests-danube'
1198                   node-parameters: true
1199                   current-parameters: false
1200                   predefined-parameters:
1201                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
1202                   kill-phase-on: NEVER
1203                   abort-all-job: false
1204                   git-revision: false
1205
1206 ########################
1207 # parameter macros
1208 ########################
1209 - parameter:
1210     name: apex-parameter
1211     parameters:
1212         - string:
1213             name: ARTIFACT_NAME
1214             default: 'latest'
1215             description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact"
1216         - string:
1217             name: ARTIFACT_VERSION
1218             default: 'daily'
1219             description: "Artifact version type"
1220         - string:
1221             name: BUILD_DIRECTORY
1222             default: $WORKSPACE/.build
1223             description: "Directory where the build artifact will be located upon the completion of the build."
1224         - string:
1225             name: CACHE_DIRECTORY
1226             default: $HOME/opnfv/apex-cache{gs-pathname}
1227             description: "Directory where the cache to be used during the build is located."
1228         - string:
1229             name: GIT_BASE
1230             default: https://gerrit.opnfv.org/gerrit/$PROJECT
1231             description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
1232         - string:
1233             name: GS_PATHNAME
1234             default: '{gs-pathname}'
1235             description: "Version directory where opnfv artifacts are stored in gs repository"
1236         - string:
1237             name: GS_URL
1238             default: $GS_BASE{gs-pathname}
1239             description: "URL to Google Storage."
1240         - string:
1241             name: PROMOTE
1242             default: 'False'
1243             description: "Flag to know if we should promote/upload snapshot artifacts."
1244
1245 ########################
1246 # builder macros
1247 ########################
1248 {% for stream in scenarios %}
1249 # {{ stream }} Builder
1250 - builder:
1251       name: apex-builder-{{ stream }}
1252       builders:
1253         - multijob:
1254             name: Baremetal Deploy and Test Phase
1255             condition: SUCCESSFUL
1256             projects:
1257 {% for scenario in scenarios[stream] %}
1258                 - name: 'apex-{{ scenario }}-baremetal-{{ stream }}'
1259                   node-parameters: false
1260                   current-parameters: false
1261                   predefined-parameters: |
1262                     OPNFV_CLEAN=yes
1263                   kill-phase-on: NEVER
1264                   abort-all-job: true
1265                   git-revision: false
1266 {% endfor %}
1267 {% endfor %}
1268
1269 - builder:
1270     name: 'apex-unit-test'
1271     builders:
1272         - shell:
1273             !include-raw: ./apex-unit-test.sh
1274
1275 - builder:
1276     name: 'apex-upload-artifact'
1277     builders:
1278         - shell:
1279             !include-raw: ./apex-upload-artifact.sh
1280
1281 - builder:
1282     name: 'apex-download-artifact'
1283     builders:
1284         - shell:
1285             !include-raw: ./apex-download-artifact.sh
1286
1287 - builder:
1288     name: 'apex-deploy'
1289     builders:
1290         - shell:
1291             !include-raw: ./apex-deploy.sh
1292
1293 #######################
1294 # trigger macros
1295 ########################
1296 - trigger:
1297     name: 'apex-master'
1298     triggers:
1299         - timed: '0 3 1 1 7'
1300 - trigger:
1301     name: 'apex-euphrates'
1302     triggers:
1303         - timed: '0 12 * * *'
1304 - trigger:
1305     name: 'apex-danube'
1306     triggers:
1307         - timed: '0 3 1 1 7'
1308