Apex: remove file-paths from triggers for verify
[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                 disable-strict-forbidden-file-verification: 'true'
146                 forbidden-file-paths:
147                   - compare-type: ANT
148                     pattern: 'apex/tests/**'
149                   - compare-type: ANT
150                     pattern: 'docs/**'
151     properties:
152         - logrotate-default
153         - build-blocker:
154             use-build-blocker: true
155             block-level: 'NODE'
156             blocking-jobs:
157                 - 'apex-verify.*'
158         - throttle:
159             max-per-node: 1
160             max-total: 10
161             option: 'project'
162
163     builders:
164         - description-setter:
165             description: "Built on $NODE_NAME"
166         - multijob:
167             name: basic
168             condition: SUCCESSFUL
169             projects:
170                 - name: 'apex-verify-unit-tests-{stream}'
171                   current-parameters: false
172                   predefined-parameters: |
173                     GERRIT_BRANCH=$GERRIT_BRANCH
174                     GERRIT_REFSPEC=$GERRIT_REFSPEC
175                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
176                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
177                   node-parameters: false
178                   kill-phase-on: FAILURE
179                   abort-all-job: true
180                   git-revision: true
181         - multijob:
182             name: build
183             condition: SUCCESSFUL
184             projects:
185                 - name: 'apex-build-{stream}'
186                   current-parameters: false
187                   predefined-parameters: |
188                     ARTIFACT_VERSION=$ARTIFACT_VERSION
189                     GERRIT_BRANCH=$GERRIT_BRANCH
190                     GERRIT_REFSPEC=$GERRIT_REFSPEC
191                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
192                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
193                   node-parameters: false
194                   kill-phase-on: FAILURE
195                   abort-all-job: true
196                   git-revision: true
197         - multijob:
198             name: deploy-virtual
199             condition: SUCCESSFUL
200             projects:
201                 - name: 'apex-deploy-virtual-{stream}'
202                   current-parameters: false
203                   predefined-parameters: |
204                     ARTIFACT_VERSION=$ARTIFACT_VERSION
205                     DEPLOY_SCENARIO={verify-scenario}
206                     OPNFV_CLEAN=yes
207                     GERRIT_BRANCH=$GERRIT_BRANCH
208                     GERRIT_REFSPEC=$GERRIT_REFSPEC
209                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
210                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
211                   node-parameters: true
212                   kill-phase-on: FAILURE
213                   abort-all-job: true
214                   git-revision: true
215         - multijob:
216             name: functest-smoke
217             condition: SUCCESSFUL
218             projects:
219               - name: 'functest-apex-virtual-suite-{stream}'
220                 current-parameters: false
221                 predefined-parameters: |
222                   DEPLOY_SCENARIO={verify-scenario}
223                   FUNCTEST_SUITE_NAME=healthcheck
224                   GERRIT_BRANCH=$GERRIT_BRANCH
225                   GERRIT_REFSPEC=$GERRIT_REFSPEC
226                   GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
227                   GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
228                 node-parameters: true
229                 kill-phase-on: NEVER
230                 abort-all-job: true
231                 git-revision: false
232
233 # Verify Scenario Gate
234 - job-template:
235     name: 'apex-verify-gate-{stream}'
236
237     node: '{virtual-slave}'
238
239     concurrent: true
240
241     project-type: 'multijob'
242
243     parameters:
244         - apex-parameter:
245             gs-pathname: '{gs-pathname}/dev'
246         - project-parameter:
247             project: '{project}'
248             branch: '{branch}'
249         - string:
250             name: GIT_BASE
251             default: https://gerrit.opnfv.org/gerrit/$PROJECT
252             description: "Used for overriding the GIT URL coming from parameters macro."
253         - string:
254             name: ARTIFACT_VERSION
255             default: dev
256             description: "Used for overriding the ARTIFACT_VERSION"
257
258     scm:
259         - git-scm-gerrit
260
261     triggers:
262         - gerrit:
263             server-name: 'gerrit.opnfv.org'
264             trigger-on:
265                 - comment-added-contains-event:
266                     comment-contains-value: '^Patch Set [0-9]+: Code-Review\+2.*start-gate-scenario:.*'
267             projects:
268               - project-compare-type: 'ANT'
269                 project-pattern: 'apex'
270                 branches:
271                   - branch-compare-type: 'ANT'
272                     branch-pattern: '**/{branch}'
273                 file-paths:
274                   - compare-type: ANT
275                     pattern: 'ci/**'
276                   - compare-type: ANT
277                     pattern: 'build/**'
278                   - compare-type: ANT
279                     pattern: 'lib/**'
280                   - compare-type: ANT
281                     pattern: 'config/**'
282                   - compare-type: ANT
283                     pattern: 'apex/**'
284
285     properties:
286         - logrotate-default
287         - build-blocker:
288             use-build-blocker: true
289             block-level: 'NODE'
290             blocking-jobs:
291                 - 'apex-verify.*'
292         - throttle:
293             max-per-node: 1
294             max-total: 10
295             option: 'project'
296
297     builders:
298         - multijob:
299             name: deploy-virtual
300             condition: SUCCESSFUL
301             projects:
302                 - name: 'apex-deploy-virtual-{stream}'
303                   current-parameters: false
304                   predefined-parameters: |
305                     ARTIFACT_VERSION=$ARTIFACT_VERSION
306                     DEPLOY_SCENARIO=gate
307                     OPNFV_CLEAN=yes
308                     GERRIT_BRANCH=$GERRIT_BRANCH
309                     GERRIT_REFSPEC=$GERRIT_REFSPEC
310                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
311                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
312                     GERRIT_EVENT_COMMENT_TEXT=$GERRIT_EVENT_COMMENT_TEXT
313                   node-parameters: true
314                   kill-phase-on: FAILURE
315                   abort-all-job: true
316                   git-revision: true
317         - shell: |
318             echo DEPLOY_SCENARIO=$(echo $GERRIT_EVENT_COMMENT_TEXT | grep start-gate-scenario | grep -Eo 'os-.*') > detected_scenario
319         - inject:
320            properties-file: detected_scenario
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=$DEPLOY_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: 140
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                   enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-nosdn-nofeature-ha/"
621                   kill-phase-on: NEVER
622                   abort-all-job: false
623                   git-revision: false
624 # Build status is always success due conditional plugin prefetching
625 # build status before multijob phases execute
626 #        - conditional-step:
627 #            condition-kind: current-status
628 #            condition-worst: SUCCESS
629 #            condtion-best: SUCCESS
630 #            on-evaluation-failure: mark-unstable
631 #            steps:
632 #                - shell: 'echo "Tests Passed"'
633
634 {% for stream in scenarios %}
635 # {{ stream }} Daily
636 - job-template:
637     name: 'apex-daily-{{ stream }}'
638
639     # Job template for daily build
640     #
641     # Required Variables:
642     #     stream:    branch with - in place of / (eg. stable)
643     #     branch:    branch (eg. stable)
644     project-type: 'multijob'
645
646     node: '{{ build_slave[stream] }}'
647
648     disabled: false
649
650     scm:
651         - git-scm
652
653     parameters:
654         - '{project}-defaults'
655         - '{project}-baremetal-{{ stream }}-defaults'
656         - project-parameter:
657             project: '{project}'
658             branch: '{{ branch[stream] }}'
659         - apex-parameter:
660             gs-pathname: '{{ gspathname[stream] }}'
661
662     properties:
663         - logrotate-default
664
665     triggers:
666         - 'apex-{{ stream }}'
667
668     builders:
669         - multijob:
670             name: build
671             condition: SUCCESSFUL
672             projects:
673                 - name: 'apex-build-{{ stream }}'
674                   current-parameters: false
675                   predefined-parameters: |
676                     GERRIT_BRANCH=$GERRIT_BRANCH
677                     GERRIT_REFSPEC=
678                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
679                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
680                   node-parameters: true
681                   kill-phase-on: FAILURE
682                   abort-all-job: true
683                   git-revision: true
684         - multijob:
685             name: 'Verify and upload ISO'
686             condition: SUCCESSFUL
687             projects:
688                 - name: 'apex-verify-iso-{{ stream }}'
689                   current-parameters: false
690                   predefined-parameters: |
691                     BUILD_DIRECTORY=$WORKSPACE/../apex-build-{{ stream }}/.build
692                     GERRIT_BRANCH=$GERRIT_BRANCH
693                     GERRIT_REFSPEC=
694                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
695                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
696                   node-parameters: true
697                   kill-phase-on: FAILURE
698                   abort-all-job: true
699                   git-revision: true
700         - multijob:
701             name: Baremetal Deploy and Test Phase
702             condition: SUCCESSFUL
703             projects:
704 {% for scenario in scenarios[stream] %}
705                 - name: 'apex-{{ scenario }}-baremetal-{{ stream }}'
706                   node-parameters: false
707                   current-parameters: false
708                   predefined-parameters: |
709                     OPNFV_CLEAN=yes
710                   kill-phase-on: NEVER
711                   abort-all-job: true
712                   git-revision: false
713 {% endfor %}
714 {% endfor %}
715
716 # snapshot create
717 - job-template:
718     name: 'apex-create-snapshot'
719
720     # Job template for clean
721     #
722     # Required Variables:
723     #     stream:    branch with - in place of / (eg. stable)
724
725     disabled: false
726
727     builders:
728         - shell:
729             !include-raw-escape: ./apex-snapshot-create.sh
730
731 # snapshot upload
732 - job-template:
733     name: 'apex-upload-snapshot'
734
735     # Job template for clean
736     #
737     # Required Variables:
738     #     stream:    branch with - in place of / (eg. stable)
739
740     disabled: false
741
742     builders:
743         - inject:
744            properties-content: ARTIFACT_TYPE=snapshot
745         - 'apex-upload-artifact'
746
747 # CSIT promote
748 - job-template:
749     name: 'apex-csit-promote-daily-{stream}'
750
751     # Job template for promoting CSIT Snapshots
752     #
753     # Required Variables:
754     #     stream:    branch with - in place of / (eg. stable)
755     #     branch:    branch (eg. stable)
756     node: '{virtual-slave}'
757     project-type: 'multijob'
758     disabled: false
759
760     scm:
761         - git-scm
762
763     parameters:
764         - project-parameter:
765             project: '{project}'
766             branch: '{branch}'
767         - apex-parameter:
768             gs-pathname: '{gs-pathname}'
769
770     properties:
771         - build-blocker:
772             use-build-blocker: true
773             block-level: 'NODE'
774             blocking-jobs:
775                 - 'apex-verify.*'
776                 - 'apex-deploy.*'
777                 - 'apex-runner.*'
778                 - 'apex-daily.*'
779
780     triggers:
781         - timed: '0 12 * * 0'
782
783     builders:
784         - multijob:
785             name: build
786             condition: SUCCESSFUL
787             projects:
788                 - name: 'apex-build-{stream}'
789                   current-parameters: false
790                   predefined-parameters: |
791                     GERRIT_BRANCH=$GERRIT_BRANCH
792                     GERRIT_REFSPEC=$GERRIT_REFSPEC
793                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
794                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
795                   node-parameters: false
796                   kill-phase-on: FAILURE
797                   abort-all-job: true
798                   git-revision: true
799         - multijob:
800             name: deploy-virtual
801             condition: SUCCESSFUL
802             projects:
803                 - name: 'apex-deploy-virtual-{stream}'
804                   current-parameters: false
805                   predefined-parameters: |
806                     DEPLOY_SCENARIO=os-odl_l3-csit-noha
807                     OPNFV_CLEAN=yes
808                     GERRIT_BRANCH=$GERRIT_BRANCH
809                     GERRIT_REFSPEC=$GERRIT_REFSPEC
810                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
811                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
812                     PROMOTE=True
813                   node-parameters: true
814                   kill-phase-on: FAILURE
815                   abort-all-job: true
816                   git-revision: false
817         - multijob:
818             name: functest-smoke
819             condition: SUCCESSFUL
820             projects:
821               - name: 'functest-apex-virtual-suite-{stream}'
822                 current-parameters: false
823                 predefined-parameters: |
824                   DEPLOY_SCENARIO=os-odl_l3-nofeature-noha
825                   FUNCTEST_SUITE_NAME=tempest_smoke_serial
826                   GERRIT_BRANCH=$GERRIT_BRANCH
827                   GERRIT_REFSPEC=$GERRIT_REFSPEC
828                   GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
829                   GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
830                 node-parameters: true
831                 kill-phase-on: FAILURE
832                 abort-all-job: true
833                 git-revision: false
834         - multijob:
835             name: create snapshot
836             condition: SUCCESSFUL
837             projects:
838               - name: 'apex-create-snapshot'
839                 current-parameters: false
840                 predefined-parameters: |
841                   SNAP_TYPE=csit
842                 node-parameters: true
843                 kill-phase-on: FAILURE
844                 abort-all-job: true
845                 git-revision: false
846         - multijob:
847             name: upload snapshot
848             condition: SUCCESSFUL
849             projects:
850               - name: 'apex-upload-snapshot'
851                 current-parameters: false
852                 predefined-parameters: |
853                   SNAP_TYPE=csit
854                 node-parameters: true
855                 kill-phase-on: FAILURE
856                 abort-all-job: true
857                 git-revision: false
858
859 # FDIO promote
860 - job-template:
861     name: 'apex-fdio-promote-daily-{stream}'
862
863     # Job template for promoting CSIT Snapshots
864     #
865     # Required Variables:
866     #     stream:    branch with - in place of / (eg. stable)
867     #     branch:    branch (eg. stable)
868     node: '{virtual-slave}'
869     project-type: 'multijob'
870     disabled: false
871
872     scm:
873         - git-scm
874
875     parameters:
876         - project-parameter:
877             project: '{project}'
878             branch: '{branch}'
879         - apex-parameter:
880             gs-pathname: '{gs-pathname}'
881
882     properties:
883         - build-blocker:
884             use-build-blocker: true
885             block-level: 'NODE'
886             blocking-jobs:
887                 - 'apex-verify.*'
888                 - 'apex-deploy.*'
889                 - 'apex-runner.*'
890                 - 'apex-daily.*'
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_netvirt-fdio-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: create snapshot
928             condition: SUCCESSFUL
929             projects:
930               - name: 'apex-create-snapshot'
931                 current-parameters: false
932                 predefined-parameters: |
933                   SNAP_TYPE=fdio
934                 node-parameters: true
935                 kill-phase-on: FAILURE
936                 abort-all-job: true
937                 git-revision: false
938         - multijob:
939             name: upload snapshot
940             condition: SUCCESSFUL
941             projects:
942               - name: 'apex-upload-snapshot'
943                 current-parameters: false
944                 predefined-parameters: |
945                   SNAP_TYPE=fdio
946                 node-parameters: true
947                 kill-phase-on: FAILURE
948                 abort-all-job: true
949                 git-revision: false
950
951 ########################
952 # parameter macros
953 ########################
954 - parameter:
955     name: apex-parameter
956     parameters:
957         - string:
958             name: ARTIFACT_NAME
959             default: 'latest'
960             description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact"
961         - string:
962             name: ARTIFACT_VERSION
963             default: 'daily'
964             description: "Artifact version type"
965         - string:
966             name: BUILD_DIRECTORY
967             default: $WORKSPACE/.build
968             description: "Directory where the build artifact will be located upon the completion of the build."
969         - string:
970             name: CACHE_DIRECTORY
971             default: $HOME/opnfv/apex-cache{gs-pathname}
972             description: "Directory where the cache to be used during the build is located."
973         - string:
974             name: GIT_BASE
975             default: https://gerrit.opnfv.org/gerrit/$PROJECT
976             description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
977         - string:
978             name: GS_PATHNAME
979             default: '{gs-pathname}'
980             description: "Version directory where opnfv artifacts are stored in gs repository"
981         - string:
982             name: GS_URL
983             default: $GS_BASE{gs-pathname}
984             description: "URL to Google Storage."
985         - string:
986             name: PROMOTE
987             default: 'False'
988             description: "Flag to know if we should promote/upload snapshot artifacts."
989
990 ########################
991 # builder macros
992 ########################
993 - builder:
994     name: 'apex-unit-test'
995     builders:
996         - shell:
997             !include-raw: ./apex-unit-test.sh
998
999 - builder:
1000     name: 'apex-workspace-cleanup'
1001     builders:
1002         - shell:
1003             !include-raw: ./apex-workspace-cleanup.sh
1004
1005
1006 - builder:
1007     name: 'apex-upload-artifact'
1008     builders:
1009         - shell:
1010             !include-raw: ./apex-upload-artifact.sh
1011
1012 - builder:
1013     name: 'apex-download-artifact'
1014     builders:
1015         - shell:
1016             !include-raw: ./apex-download-artifact.sh
1017
1018 - builder:
1019     name: 'apex-deploy'
1020     builders:
1021         - shell:
1022             !include-raw: ./apex-deploy.sh
1023
1024 #######################
1025 # trigger macros
1026 ########################
1027 - trigger:
1028     name: 'apex-master'
1029     triggers:
1030         - timed: '0 12 * * *'
1031 - trigger:
1032     name: 'apex-danube'
1033     triggers:
1034         - timed: '0 3 1 1 7'
1035