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