summaryrefslogtreecommitdiffstats
path: root/jjb/apex/apex.yml
blob: 8a5a82f13df9674f1276c7569a97ff1ebfa35cf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120

@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sa { color: #e6db74 } /* Literal.String.Affix */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #a6e22e } /* Name.Function.Magic */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
}
@media (prefers-color-scheme: light) {
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
}
# This map is not a full koi8-r <> utf8 map: it does not contain
# box-drawing and some other characters.  Besides this map contains
# several koi8-u and Byelorussian letters which are not in koi8-r.
# If you need a full and standard map, use contrib/unicode2nginx/koi-utf
# map instead.

charset_map  koi8-r  utf-8 {

    80  E282AC ; # euro

    95  E280A2 ; # bullet

    9A  C2A0 ;   # &nbsp;

    9E  C2B7 ;   # &middot;

    A3  D191 ;   # small yo
    A4  D194 ;   # small Ukrainian ye

    A6  D196 ;   # small Ukrainian i
    A7  D197 ;   # small Ukrainian yi

    AD  D291 ;   # small Ukrainian soft g
    AE  D19E ;   # small Byelorussian short u

    B0  C2B0 ;   # &deg;

    B3  D081 ;   # capital YO
    B4  D084 ;   # capital Ukrainian YE

    B6  D086 ;   # capital Ukrainian I
    B7  D087 ;   # capital Ukrainian YI

    B9  E28496 ; # numero sign

    BD  D290 ;   # capital Ukrainian soft G
    BE  D18E ;   # capital Byelorussian short U

    BF  C2A9 ;   # (C)

    C0  D18E ;   # small yu
    C1  D0B0 ;   # small a
    C2  D0B1 ;   # small b
    C3  D186 ;   # small ts
    C4  D0B4 ;   # small d
    C5  D0B5 ;   # small ye
    C6  D184 ;   # small f
    C7  D0B3 ;   # small g
    C8  D185 ;   # small kh
    C9  D0B8 ;   # small i
    CA  D0B9 ;   # small j
    CB  D0BA ;   # small k
    CC  D0BB ;   # small l
    CD  D0BC ;   # small m
    CE  D0BD ;   # small n
    CF  D0BE ;   # small o

    D0  D0BF ;   # small p
    D1  D18F ;   # small ya
    D2  D180 ;   # small r
    D3  D181 ;   # small s
    D4  D182 ;   # small t
    D5  D183 ;   # small u
    D6  D0B6 ;   # small zh
    D7  D0B2 ;   # small v
    D8  D18C ;   # small soft sign
    D9  D18B ;   # small y
    DA  D0B7 ;   # small z
    DB  D188 ;   # small sh
    DC  D18D ;   # small e
    DD  D189 ;   # small shch
    DE  D187 ;   # small ch
    DF  D18A ;   # small hard sign

    E0  D0AE ;   # capital YU
    E1  D090 ;   # capital A
    E2  D091 ;   # capital B
    E3  D0A6 ;   # capital TS
    E4  D094 ;   # capital D
    E5  D095 ;   # capital YE
    E6  D0A4 ;   # capital F
    E7  D093 ;   # capital G
    E8  D0A5 ;   # capital KH
    E9  D098 ;   # capital I
    EA  D099 ;   # capital J
    EB  D09A ;   # capital K
    EC  D09B ;   # capital L
    ED  D09C ;   # capital M
    EE  D09D ;   # capital N
    EF  D09E ;   # capital O

    F0  D09F ;   # capital P
    F1  D0AF ;   # capital YA
    F2  D0A0 ;   # capital R
    F3  D0A1 ;   # capital S
    F4  D0A2 ;   # capital T
    F5  D0A3 ;   # capital U
    F6  D096 ;   # capital ZH
    F7  D092 ;   # capital V
    F8  D0AC ;   # capital soft sign
    F9  D0AB ;   # capital Y
    FA  D097 ;   # capital Z
    FB  D0A8 ;   # capital SH
    FC  D0AD ;   # capital E
    FD  D0A9 ;   # capital SHCH
    FE  D0A7 ;   # capital CH
    FF  D0AA ;   # capital hard sign
}
2'>502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959
- project:
    name: apex
    jobs:
        - 'apex-verify-{stream}'
        - 'apex-verify-unit-tests-{stream}'
        - 'apex-runner-{platform}-{scenario}-{stream}'
        - 'apex-runner-cperf-{stream}'
        - 'apex-build-{stream}'
        - 'apex-deploy-virtual-{scenario}-{stream}'
        - 'apex-deploy-baremetal-{scenario}-{stream}'
        - 'apex-daily-{stream}'

    # stream:    branch with - in place of / (eg. stable-arno)
    # branch:    branch (eg. stable/arno)
    stream:
        - master:
            branch: 'master'
            gs-pathname: ''
            block-stream: 'colorado'
            slave: 'lf-pod1'
            verify-slave: 'apex-verify-master'
            daily-slave: 'apex-daily-master'
        - colorado:
            branch: 'stable/colorado'
            gs-pathname: '/colorado'
            block-stream: 'master'
            slave: 'lf-pod1'
            verify-slave: 'apex-verify-colorado'
            daily-slave: 'apex-daily-colorado'
            disabled: false

    stream1:
        - master:
            branch: 'master'
            gs-pathname: ''
            block-stream: 'colorado'
            slave: 'lf-pod1'
            verify-slave: 'apex-verify-master'
            daily-slave: 'apex-daily-master'

    stream2:
        - colorado:
            branch: 'stable/colorado'
            gs-pathname: '/colorado'
            block-stream: 'master'
            slave: 'lf-pod1'
            verify-slave: 'apex-verify-colorado'
            daily-slave: 'apex-daily-colorado'
            disabled: false

    project: 'apex'

    scenario:
         - 'os-nosdn-nofeature-noha'
         - 'os-nosdn-nofeature-ha'
         - 'os-nosdn-nofeature-ha-ipv6'
         - 'os-nosdn-ovs-noha'
         - 'os-nosdn-fdio-noha'
         - 'os-odl_l2-nofeature-ha'
         - 'os-odl_l2-bgpvpn-ha'
         - 'os-odl_l2-fdio-noha'
         - 'os-odl_l2-sfc-noha'
         - 'os-odl_l3-nofeature-ha'
         - 'os-onos-nofeature-ha'
         - 'os-onos-sfc-ha'
         - 'os-ocl-nofeature-ha'

    platform:
         - 'baremetal'
         - 'virtual'

# Unit Test
- job-template:
    name: 'apex-verify-unit-tests-{stream}'

    node: '{verify-slave}'

    concurrent: true

    parameters:
        - apex-parameter:
            gs-pathname: '{gs-pathname}'
        - project-parameter:
            project: '{project}'
        - gerrit-parameter:
            branch: '{branch}'
        - string:
            name: GIT_BASE
            default: https://gerrit.opnfv.org/gerrit/$PROJECT
            description: "Used for overriding the GIT URL coming from parameters macro."

    scm:
        - gerrit-trigger-scm:
            credentials-id: '{ssh-credentials}'
            refspec: '$GERRIT_REFSPEC'
            choosing-strategy: 'gerrit'

    triggers:
        - gerrit:
            trigger-on:
                - patchset-created-event:
                    exclude-drafts: 'false'
                    exclude-trivial-rebase: 'false'
                    exclude-no-code-change: 'true'
                - draft-published-event
                - comment-added-contains-event:
                    comment-contains-value: 'recheck'
                - comment-added-contains-event:
                    comment-contains-value: 'reverify'
            projects:
              - project-compare-type: 'ANT'
                project-pattern: 'apex'
                branches:
                  - branch-compare-type: 'ANT'
                    branch-pattern: '**/{branch}'
                file-paths:
                  - compare-type: ANT
                    pattern: 'tests/**'
    properties:
        - throttle:
            max-per-node: 1
            max-total: 10
            option: 'project'

    builders:
        - 'apex-unit-test'

# Verify
- job-template:
    name: 'apex-verify-{stream}'

    node: '{verify-slave}'

    concurrent: true

    parameters:
        - apex-parameter:
            gs-pathname: '{gs-pathname}'
        - project-parameter:
            project: '{project}'
        - gerrit-parameter:
            branch: '{branch}'
        - string:
            name: GIT_BASE
            default: https://gerrit.opnfv.org/gerrit/$PROJECT
            description: "Used for overriding the GIT URL coming from parameters macro."

    scm:
        - gerrit-trigger-scm:
            credentials-id: '{ssh-credentials}'
            refspec: '$GERRIT_REFSPEC'
            choosing-strategy: 'gerrit'

    triggers:
        - gerrit:
            trigger-on:
                - patchset-created-event:
                    exclude-drafts: 'false'
                    exclude-trivial-rebase: 'false'
                    exclude-no-code-change: 'true'
                - draft-published-event
                - comment-added-contains-event:
                    comment-contains-value: 'recheck'
                - comment-added-contains-event:
                    comment-contains-value: 'reverify'
            projects:
              - project-compare-type: 'ANT'
                project-pattern: 'apex'
                branches:
                  - branch-compare-type: 'ANT'
                    branch-pattern: '**/{branch}'
                file-paths:
                  - compare-type: ANT
                    pattern: 'ci/**'
                  - compare-type: ANT
                    pattern: 'build/**'
                  - compare-type: ANT
                    pattern: 'lib/**'
                  - compare-type: ANT
                    pattern: 'config/**'

    properties:
        - build-blocker:
            use-build-blocker: true
            block-level: 'NODE'
            blocking-jobs:
                - 'apex-daily.*'
                - 'apex-deploy.*'
                - 'apex-build.*'
                - 'apex-runner.*'
                - 'apex-verify.*'
        - throttle:
            max-per-node: 1
            max-total: 10
            option: 'project'

    builders:
        - 'apex-unit-test'
        - 'apex-build'
        - trigger-builds:
          - project: 'apex-deploy-virtual-os-nosdn-nofeature-ha-{stream}'
            predefined-parameters: |
              BUILD_DIRECTORY=apex-verify-{stream}
              OPNFV_CLEAN=yes
            git-revision: false
            block: true
            same-node: true
        - trigger-builds:
          - project: 'functest-apex-{verify-slave}-suite-{stream}'
            predefined-parameters: |
              DEPLOY_SCENARIO=os-nosdn-nofeature-ha
              FUNCTEST_SUITE_NAME=healthcheck
            block: true
            same-node: true
        - trigger-builds:
          - project: 'apex-deploy-virtual-os-odl_l2-nofeature-ha-{stream}'
            predefined-parameters: |
              BUILD_DIRECTORY=apex-verify-{stream}
              OPNFV_CLEAN=yes
            git-revision: false
            block: true
            same-node: true
        - trigger-builds:
          - project: 'functest-apex-{verify-slave}-suite-{stream}'
            predefined-parameters: |
              DEPLOY_SCENARIO=os-odl_l2-nofeature-ha
              FUNCTEST_SUITE_NAME=healthcheck
            block: true
            same-node: true
        - 'apex-workspace-cleanup'

- job-template:
    name: 'apex-runner-{platform}-{scenario}-{stream}'

    # runner jobs for deploying manually

    node: '{slave}'

    disabled: false

    parameters:
        - apex-parameter:
            gs-pathname: '{gs-pathname}'
        - project-parameter:
            project: '{project}'
        - gerrit-parameter:
            branch: '{branch}'
        - string:
            name: GIT_BASE
            default: https://gerrit.opnfv.org/gerrit/$PROJECT
            description: "Used for overriding the GIT URL coming from parameters macro."

    scm:
        - gerrit-trigger-scm:
            credentials-id: '{ssh-credentials}'
            refspec: ''
            choosing-strategy: 'default'

    properties:
        - build-blocker:
            use-build-blocker: true
            blocking-jobs:
                - 'apex-daily.*'
                - 'apex-verify.*'

    builders:
        - trigger-builds:
          - project: 'apex-deploy-{platform}-{scenario}-{stream}'
            predefined-parameters:
              OPNFV_CLEAN=yes
            git-revision: false
            block: true
        - trigger-builds:
          - project: 'yardstick-apex-{slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO={scenario}
            block: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'functest-apex-{slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO={scenario}
            block: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'

- job-template:
    name: 'apex-runner-cperf-{stream}'

    # runner cperf job

    node: 'intel-pod2'

    disabled: false

    parameters:
        - apex-parameter:
            gs-pathname: '{gs-pathname}'
        - project-parameter:
            project: '{project}'
        - gerrit-parameter:
            branch: '{branch}'
        - string:
            name: GIT_BASE
            default: https://gerrit.opnfv.org/gerrit/$PROJECT
            description: "Used for overriding the GIT URL coming from parameters macro."

    scm:
        - gerrit-trigger-scm:
            credentials-id: '{ssh-credentials}'
            refspec: ''
            choosing-strategy: 'default'

    properties:
        - build-blocker:
            use-build-blocker: false
            block-level: 'NODE'
            blocking-jobs:
                - 'apex-deploy.*'
        - throttle:
            max-per-node: 1
            max-total: 10
            option: 'project'

    builders:
        - trigger-builds:
          - project: 'apex-deploy-baremetal-os-odl_l2-nofeature-ha-{stream}'
            predefined-parameters:
              OPNFV_CLEAN=yes
            git-revision: false
            block: true
        - trigger-builds:
          - project: 'cperf-apex-intel-pod2-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-odl_l2-nofeature-ha
            block: true
            same-node: true

- job-template:
    name: 'apex-build-{stream}'

    # Job template for builds
    #
    # Required Variables:
    #     stream:    branch with - in place of / (eg. stable)
    #     branch:    branch (eg. stable)
    node: '{daily-slave}'

    disabled: false

    concurrent: true

    parameters:
        - project-parameter:
            project: '{project}'
        - apex-parameter:
            gs-pathname: '{gs-pathname}'
        - gerrit-parameter:
            branch: '{branch}'
        - string:
            name: GIT_BASE
            default: https://gerrit.opnfv.org/gerrit/$PROJECT
            description: "Used for overriding the GIT URL coming from parameters macro."

    scm:
        - git-scm:
            credentials-id: '{ssh-credentials}'
            refspec: ''
            branch: '{branch}'

    properties:
        - build-blocker:
            use-build-blocker: true
            block-level: 'NODE'
            blocking-jobs:
                - 'apex-deploy.*'
        - throttle:
            max-per-node: 1
            max-total: 10
            option: 'project'

    builders:
        - 'apex-build'
        - trigger-builds:
          - project: 'apex-deploy-virtual-os-nosdn-nofeature-noha-{stream}'
            predefined-parameters: |
              BUILD_DIRECTORY=apex-build-{stream}/build
              OPNFV_CLEAN=yes
            git-revision: false
            same-node: true
            block: true
        - 'apex-upload-artifact'

- job-template:
    name: 'apex-deploy-virtual-{scenario}-{stream}'

    # Job template for virtual deployment
    #
    # Required Variables:
    #     stream:    branch with - in place of / (eg. stable)
    #     branch:    branch (eg. stable)
    node: '{slave}'

    concurrent: true

    disabled: false

    scm:
        - git-scm:
            credentials-id: '{ssh-credentials}'
            refspec: ''
            branch: '{branch}'

    parameters:
        - project-parameter:
            project: '{project}'
        - apex-parameter:
            gs-pathname: '{gs-pathname}'
        - string:
            name: DEPLOY_SCENARIO
            default: '{scenario}'
            description: "Scenario to deploy with."
        - string:
            name: OPNFV_CLEAN
            default: 'no'
            description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment"

    properties:
        - build-blocker:
            use-build-blocker: true
            block-level: 'NODE'
            blocking-jobs:
                - 'apex-deploy.*'
        - throttle:
            max-per-node: 1
            max-total: 10
            option: 'project'

    builders:
        - 'apex-deploy'
        - 'apex-workspace-cleanup'

- job-template:
    name: 'apex-deploy-baremetal-{scenario}-{stream}'

    # Job template for baremetal deployment
    #
    # Required Variables:
    #     stream:    branch with - in place of / (eg. stable)
    #     branch:    branch (eg. stable)
    node: '{slave}'

    disabled: false

    scm:
        - git-scm:
            credentials-id: '{ssh-credentials}'
            refspec: ''
            branch: '{branch}'

    parameters:
        - project-parameter:
            project: '{project}'
        - apex-parameter:
            gs-pathname: '{gs-pathname}'
        - string:
            name: DEPLOY_SCENARIO
            default: '{scenario}'
            description: "Scenario to deploy with."

    properties:
        - build-blocker:
            use-build-blocker: true
            block-level: 'NODE'
            blocking-jobs:
                - 'apex-verify.*'
                - 'apex-deploy.*'
                - 'apex-build.*'


    builders:
        - 'apex-deploy'
        - 'apex-workspace-cleanup'

# Daily
- job-template:
    name: 'apex-daily-{stream}'

    # Job template for daily build
    #
    # Required Variables:
    #     stream:    branch with - in place of / (eg. stable)
    #     branch:    branch (eg. stable)
    node: '{daily-slave}'

    disabled: false

    scm:
        - git-scm:
            credentials-id: '{ssh-credentials}'
            refspec: ''
            branch: '{branch}'

    parameters:
        - project-parameter:
            project: '{project}'
        - apex-parameter:
            gs-pathname: '{gs-pathname}'

    properties:
        - build-blocker:
            use-build-blocker: true
            block-level: 'NODE'
            blocking-jobs:
                - 'apex-verify.*'
                - 'apex-deploy.*'
                - 'apex-build.*'
                - 'apex-runner.*'

    triggers:
        - 'apex-{stream}'

    builders:
        - trigger-builds:
          - project: 'apex-build-{stream}'
            git-revision: true
            current-parameters: true
            same-node: true
            block: true
        - trigger-builds:
          - project: 'apex-deploy-baremetal-os-nosdn-nofeature-ha-{stream}'
            predefined-parameters: |
              BUILD_DIRECTORY=apex-build-{stream}/build
              OPNFV_CLEAN=yes
            git-revision: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
            block: true
        - trigger-builds:
          - project: 'functest-apex-{daily-slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-nosdn-nofeature-ha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'yardstick-apex-{slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-nosdn-nofeature-ha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'apex-deploy-baremetal-os-odl_l2-nofeature-ha-{stream}'
            predefined-parameters: |
              BUILD_DIRECTORY=apex-build-{stream}/build
              OPNFV_CLEAN=yes
            git-revision: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
            block: true
        - trigger-builds:
          - project: 'functest-apex-{daily-slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-odl_l2-nofeature-ha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'yardstick-apex-{slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-odl_l2-nofeature-ha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'apex-deploy-baremetal-os-odl_l3-nofeature-ha-{stream}'
            predefined-parameters: |
              BUILD_DIRECTORY=apex-build-{stream}/build
              OPNFV_CLEAN=yes
            git-revision: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
            block: true
        - trigger-builds:
          - project: 'functest-apex-{daily-slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-odl_l3-nofeature-ha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'yardstick-apex-{slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-odl_l3-nofeature-ha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'apex-deploy-baremetal-os-onos-nofeature-ha-{stream}'
            predefined-parameters: |
              BUILD_DIRECTORY=apex-build-{stream}/build
              OPNFV_CLEAN=yes
            git-revision: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
            block: true
        - trigger-builds:
          - project: 'functest-apex-{daily-slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-onos-nofeature-ha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'yardstick-apex-{slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-onos-nofeature-ha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'apex-deploy-baremetal-os-odl_l2-bgpvpn-ha-{stream}'
            predefined-parameters: |
              BUILD_DIRECTORY=apex-build-{stream}/build
              OPNFV_CLEAN=yes
            git-revision: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
            block: true
        - trigger-builds:
          - project: 'functest-apex-{daily-slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-odl_l2-bgpvpn-ha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'yardstick-apex-{slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-odl_l2-bgpvpn-ha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'apex-deploy-baremetal-os-onos-sfc-ha-{stream}'
            predefined-parameters: |
              BUILD_DIRECTORY=apex-build-{stream}/build
              OPNFV_CLEAN=yes
            git-revision: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
            block: true
        - trigger-builds:
          - project: 'functest-apex-{daily-slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-onos-sfc-ha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'yardstick-apex-{slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-onos-sfc-ha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'apex-deploy-baremetal-os-odl_l2-sfc-noha-{stream}'
            predefined-parameters: |
              BUILD_DIRECTORY=apex-build-{stream}/build
              OPNFV_CLEAN=yes
            git-revision: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
            block: true
        - trigger-builds:
          - project: 'functest-apex-{daily-slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-odl_l2-sfc-noha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'yardstick-apex-{slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-odl_l2-sfc-noha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'apex-deploy-baremetal-os-odl_l2-fdio-noha-{stream}'
            predefined-parameters: |
              BUILD_DIRECTORY=apex-build-{stream}/build
              OPNFV_CLEAN=yes
            git-revision: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
            block: true
        - trigger-builds:
          - project: 'functest-apex-{daily-slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-odl_l2-fdio-noha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'yardstick-apex-{slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-odl_l2-fdio-noha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'apex-deploy-baremetal-os-nosdn-fdio-noha-{stream}'
            predefined-parameters: |
              BUILD_DIRECTORY=apex-build-{stream}/build
              OPNFV_CLEAN=yes
            git-revision: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
            block: true
        - trigger-builds:
          - project: 'functest-apex-{daily-slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-nosdn-fdio-noha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'yardstick-apex-{slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-nosdn-fdio-noha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'apex-deploy-virtual-os-nosdn-nofeature-ha-ipv6-{stream}'
            predefined-parameters: |
              BUILD_DIRECTORY=apex-build-{stream}/build
              OPNFV_CLEAN=yes
            git-revision: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
            block: true
        - trigger-builds:
          - project: 'apex-deploy-baremetal-os-nosdn-ovs-noha-{stream}'
            predefined-parameters: |
              BUILD_DIRECTORY=apex-build-{stream}/build
              OPNFV_CLEAN=yes
            git-revision: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
            block: true
        - trigger-builds:
          - project: 'functest-apex-{daily-slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-nosdn-ovs-noha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'
        - trigger-builds:
          - project: 'yardstick-apex-{slave}-daily-{stream}'
            predefined-parameters:
              DEPLOY_SCENARIO=os-nosdn-ovs-noha
            block: true
            same-node: true
            block-thresholds:
                build-step-failure-threshold: 'never'
                failure-threshold: 'never'
                unstable-threshold: 'FAILURE'

- job-template:
    name: 'apex-gs-clean-{stream}'

    # Job template for clean
    #
    # Required Variables:
    #     stream:    branch with - in place of / (eg. stable)
    node: '{slave}'

    disabled: false

    parameters:
        - project-parameter:
            project: '{project}'
        - apex-parameter:
            gs-pathname: '{gs-pathname}'

    builders:
        - 'apex-gs-clean'

    triggers:
        - 'apex-gs-clean-{stream}'


########################
# parameter macros
########################
- parameter:
    name: apex-parameter
    parameters:
        - string:
            name: ARTIFACT_NAME
            default: 'latest'
            description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact"
        - string:
            name: ARTIFACT_VERSION
            default: 'daily'
            description: "Artifact version type"
        - string:
            name: BUILD_DIRECTORY
            default: $WORKSPACE/build
            description: "Directory where the build artifact will be located upon the completion of the build."
        - string:
            name: CACHE_DIRECTORY
            default: $HOME/opnfv/cache{gs-pathname}
            description: "Directory where the cache to be used during the build is located."
        - string:
            name: GIT_BASE
            default: https://gerrit.opnfv.org/gerrit/$PROJECT
            description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
        - string:
            name: GS_PATHNAME
            default: '{gs-pathname}'
            description: "Version directory where opnfv artifacts are stored in gs repository"
        - string:
            name: GS_URL
            default: artifacts.opnfv.org/$PROJECT{gs-pathname}
            description: "URL to Google Storage."

########################
# builder macros
########################
- builder:
    name: 'apex-unit-test'
    builders:
        - shell:
            !include-raw: ./apex-unit-test.sh

- builder:
    name: 'apex-build'
    builders:
        - shell:
            !include-raw: ./apex-build.sh

- builder:
    name: 'apex-workspace-cleanup'
    builders:
        - shell:
            !include-raw: ./apex-workspace-cleanup.sh

- builder:
    name: 'apex-upload-artifact'
    builders:
        - shell:
            !include-raw: ./apex-upload-artifact.sh

- builder:
    name: 'apex-gs-cleanup'
    builders:
        - shell:
            !include-raw: ./apex-gs-cleanup.sh

- builder:
    name: 'apex-deploy'
    builders:
        - shell:
            !include-raw: ./apex-deploy.sh


#######################
# trigger macros
########################
- trigger:
    name: 'apex-master'
    triggers:
        - timed: '0 0 20 8 *'
- trigger:
    name: 'apex-colorado'
    triggers:
        - timed: '0 3 * * *'
- trigger:
    name: 'apex-gs-clean-{stream}'
    triggers:
        - timed: '0 2 * * *'