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