summaryrefslogtreecommitdiffstats
path: root/jjb/functest/functest-pi.yaml
blob: 52dc042e461387c3ff9d3273f5dd8b5794c47be0 (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
TYPE: baremetal
FLAVOR: cluster
POWER_TOOL: ipmitool

ipmiUser: root
ipmiVer: '2.0'

hosts:
  - name: host1
    mac: '70:7b:e8:75:71:d3'
    interfaces:
       - eth1: '70:7b:e8:75:71:d2'
    ipmiIp: 172.31.123.2
    ipmiPass: root
    roles:
      - controller
      - ha
      - ceph-adm
      - ceph-mon

  - name: host2
    mac: '70:7b:e8:75:72:21'
    interfaces:
      - eth1: '70:7b:e8:75:72:20'
    ipmiIp: 172.31.123.3
    ipmiPass: root
    roles:
      - controller
      - ha
      - ceph-mon

  - name: host3
    mac: '70:7b:e8:75:71:37'
    interfaces:
      - eth1: '70:7b:e8:75:71:36'
    ipmiIp: 172.31.123.4
    ipmiPass: root
    roles:
      - controller
      - ha
      - ceph-mon

  - name: host4
    mac: '70:7b:e8:75:71:dc'
    interfaces:
      - eth1: '70:7b:e8:75:71:db'
    ipmiIp: 172.31.123.5
    ipmiPass: root
    roles:
      - compute
      - ceph-osd

  - name: host5
    mac: '70:7b:e8:75:71:d6'
    interfaces:
      - eth1: '70:7b:e8:75:71:d5'
    ipmiIp: 172.31.123.6
    ipmiPass: root
    roles:
      - compute
      - ceph-osd
#n576'>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
---
- functest-pi-containers: &functest-pi-containers
    name: 'functest-pi-containers'
    repo: '{repo}'
    port: '{port}'
    container: '{container}'
    tag: '{tag}'

- functest-pi-params: &functest-pi-params
    name: 'functest-pi-params'
    repo: 'ollivier'
    port:
    tag:
      - latest:
          slave: lf-pod4-2
          DASHBOARD_URL: http://172.30.12.85
      - wallaby:
          slave: lf-virtual6
          DASHBOARD_URL: http://172.30.13.91
      - leguer:
          slave: lf-virtual9
          DASHBOARD_URL: http://172.30.13.94
      - kali:
          slave: lf-pod4-3
          DASHBOARD_URL: http://172.30.12.88
      - jerma:
          slave: lf-pod4
          DASHBOARD_URL: http://172.30.12.83
      - arm-latest:
          slave: lf-pod4-2
          DASHBOARD_URL: http://172.30.12.85
      - arm-wallaby:
          slave: lf-virtual6
          DASHBOARD_URL: http://172.30.13.91
      - arm-leguer:
          slave: lf-virtual9
          DASHBOARD_URL: http://172.30.13.94
      - arm-kali:
          slave: lf-pod4-3
          DASHBOARD_URL: http://172.30.12.88
      - arm-jerma:
          slave: lf-pod4
          DASHBOARD_URL: http://172.30.12.83
      - arm64-latest:
          slave: lf-pod4-2
          DASHBOARD_URL: http://172.30.12.85
      - arm64-wallaby:
          slave: lf-virtual6
          DASHBOARD_URL: http://172.30.13.91
      - arm64-leguer:
          slave: lf-virtual9
          DASHBOARD_URL: http://172.30.13.94
      - arm64-kali:
          slave: lf-pod4-3
          DASHBOARD_URL: http://172.30.12.88
      - arm64-jerma:
          slave: lf-pod4
          DASHBOARD_URL: http://172.30.12.83

- functest-pi-jobs: &functest-pi-jobs
    name: 'functest-pi-jobs'
    current-parameters: true

- parameter:
    name: functest-pi-slave
    parameters:
      - label:
          name: slave
          default: '{slave}'

- parameter:
    name: functest-pi-build_tag
    parameters:
      - random-string:
          name: build_tag

- parameter:
    name: functest-pi-EXTERNAL_NETWORK
    parameters:
      - string:
          name: EXTERNAL_NETWORK
          default: public

- parameter:
    name: functest-pi-VOLUME_DEVICE_NAME
    parameters:
      - string:
          name: VOLUME_DEVICE_NAME
          default: sdb

- parameter:
    name: functest-pi-IMAGE_PROPERTIES
    parameters:
      - string:
          name: IMAGE_PROPERTIES
          default: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi

- functest-pi-run-containers: &functest-pi-run-containers
    name: 'functest-pi-run-containers'
    <<: *functest-pi-containers
    test: '{test}'
    privileged: '{privileged}'
    volumes: '{volumes}'
    env: '{env}'
    network: '{network}'
    DASHBOARD_URL: '{DASHBOARD_URL}'

- builder:
    name: functest-pi-pull-containers
    builders:
      - shell: |
          set +x
          if [ "{repo}" = "_" ]; then
            image={container}:{tag}
          elif [ "{port}" = "None" ]; then
            image={repo}/{container}:{tag}
          else
            image={repo}:{port}/{container}:{tag}
          fi
          sudo docker pull $image

- builder:
    name: functest-pi-run-containers
    builders:
      - shell: |
          set +x
          volumes=;
          if [ "{volumes}" != "None" ]; then
            for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); do volumes="-v $i $volumes"; done
          fi
          env=;
          if [ "{env}" != "None" ]; then
            for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); do env="-e $i $env"; done
          fi
          [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
          if [ "{repo}" = "_" ]; then
            image={container}:{tag}
          elif [ "{port}" = "None" ]; then
            image={repo}/{container}:{tag}
          else
            image={repo}:{port}/{container}:{tag}
          fi
          sudo docker run --rm \
            --privileged={privileged} \
            --network={network} \
            $volumes \
            $env \
            -e S3_ENDPOINT_URL=https://storage.googleapis.com \
            -e S3_DST_URL=s3://artifacts.opnfv.org/functest/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
            -e HTTP_DST_URL=http://artifacts.opnfv.org/functest/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
            -v /home/opnfv/functest/.boto:/root/.boto \
            -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
            -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
            -e NODE_NAME=$slave \
            -e BUILD_TAG=$BUILD_TAG \
            -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
            -e DASHBOARD_URL={DASHBOARD_URL} \
            $image run_tests -t {test} -p -r

- builder:
    name: functest-pi-remove-images
    builders:
      - shell: |
          set +x
          if [ "{repo}" = "_" ]; then
            image={container}:{tag}
          elif [ "{port}" = "None" ]; then
            image={repo}/{container}:{tag}
          else
            image={repo}:{port}/{container}:{tag}
          fi
          sudo docker rmi $image || true

- job-template:
    name: 'functest-pi-{repo}-{container}-{tag}-pull'
    parameters:
      - functest-pi-slave:
          slave: '{slave}'
    builders:
      - functest-pi-pull-containers:
          <<: *functest-pi-containers

- project:
    name: 'functest-pi-ollivier-functest-healthcheck-pull'
    <<: *functest-pi-params
    container: 'functest-healthcheck'
    jobs:
      - 'functest-pi-{repo}-{container}-{tag}-pull'

- project:
    name: 'functest-pi-ollivier-functest-smoke-pull'
    <<: *functest-pi-params
    container: 'functest-smoke'
    jobs:
      - 'functest-pi-{repo}-{container}-{tag}-pull'

- project:
    name: 'functest-pi-ollivier-functest-smoke-cntt-pull'
    <<: *functest-pi-params
    container: 'functest-smoke-cntt'
    jobs:
      - 'functest-pi-{repo}-{container}-{tag}-pull'

- project:
    name: 'functest-pi-ollivier-functest-benchmarking-pull'
    <<: *functest-pi-params
    container: 'functest-benchmarking'
    jobs:
      - 'functest-pi-{repo}-{container}-{tag}-pull'

- project:
    name: 'functest-pi-ollivier-functest-benchmarking-cntt-pull'
    <<: *functest-pi-params
    container: 'functest-benchmarking-cntt'
    jobs:
      - 'functest-pi-{repo}-{container}-{tag}-pull'

- project:
    name: 'functest-pi-ollivier-functest-vnf-pull'
    <<: *functest-pi-params
    container: 'functest-vnf'
    jobs:
      - 'functest-pi-{repo}-{container}-{tag}-pull'

- job-template:
    name: 'functest-pi-{repo}-{container}-{tag}-rmi'
    parameters:
      - functest-pi-slave:
          slave: '{slave}'
    builders:
      - functest-pi-remove-images:
          <<: *functest-pi-containers

- project:
    name: 'functest-pi-ollivier-functest-healthcheck-rmi'
    <<: *functest-pi-params
    container: 'functest-healthcheck'
    jobs:
      - 'functest-pi-{repo}-{container}-{tag}-rmi'

- project:
    name: 'functest-pi-ollivier-functest-smoke-rmi'
    <<: *functest-pi-params
    container: 'functest-smoke'
    jobs:
      - 'functest-pi-{repo}-{container}-{tag}-rmi'

- project:
    name: 'functest-pi-ollivier-functest-smoke-cntt-rmi'
    <<: *functest-pi-params
    container: 'functest-smoke-cntt'
    jobs:
      - 'functest-pi-{repo}-{container}-{tag}-rmi'

- project:
    name: 'functest-pi-ollivier-functest-benchmarking-rmi'
    <<: *functest-pi-params
    container: 'functest-benchmarking'
    jobs:
      - 'functest-pi-{repo}-{container}-{tag}-rmi'

- project:
    name: 'functest-pi-ollivier-functest-benchmarking-cntt-rmi'
    <<: *functest-pi-params
    container: 'functest-benchmarking-cntt'
    jobs:
      - 'functest-pi-{repo}-{container}-{tag}-rmi'

- project:
    name: 'functest-pi-ollivier-functest-vnf-rmi'
    <<: *functest-pi-params
    container: 'functest-vnf'
    jobs:
      - 'functest-pi-{repo}-{container}-{tag}-rmi'

- job-template:
    name: 'functest-pi-ollivier-functest-healthcheck-{tag}-{test}-run'
    parameters:
      - functest-pi-slave:
          slave: '{slave}'
      - functest-pi-build_tag:
          build_tag: ''
      - functest-pi-EXTERNAL_NETWORK:
          EXTERNAL_NETWORK: public
      - functest-pi-VOLUME_DEVICE_NAME:
          VOLUME_DEVICE_NAME: sdb
      - functest-pi-IMAGE_PROPERTIES:
          IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
    builders:
      - functest-pi-run-containers:
          <<: *functest-pi-run-containers

- project:
    name: 'functest-pi-ollivier-functest-healthcheck'
    <<: *functest-pi-params
    volumes:
      - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
      - /home/opnfv/functest/images:/home/opnfv/functest/images
    env:
      - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
      - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
      - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
    container: 'functest-healthcheck'
    test:
      - connection_check
      - tenantnetwork1
      - tenantnetwork2
      - vmready1
      - vmready2
      - singlevm1
      - singlevm2
      - vping_ssh
      - vping_userdata
      - cinder_test
      - odl
      - tempest_smoke
      - tempest_horizon
    privileged: 'false'
    network: bridge
    jobs:
      - 'functest-pi-ollivier-functest-healthcheck-{tag}-{test}-run'

- job-template:
    name: 'functest-pi-ollivier-functest-smoke-{tag}-{test}-run'
    parameters:
      - functest-pi-slave:
          slave: '{slave}'
      - functest-pi-build_tag:
          build_tag: ''
      - functest-pi-EXTERNAL_NETWORK:
          EXTERNAL_NETWORK: public
      - functest-pi-VOLUME_DEVICE_NAME:
          VOLUME_DEVICE_NAME: sdb
      - functest-pi-IMAGE_PROPERTIES:
          IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
    builders:
      - functest-pi-run-containers:
          <<: *functest-pi-run-containers

- project:
    name: 'functest-pi-ollivier-functest-smoke'
    <<: *functest-pi-params
    volumes:
      - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
      - /home/opnfv/functest/images:/home/opnfv/functest/images
    env:
      - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
      - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
      - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
    container: 'functest-smoke'
    test:
      - tempest_neutron
      - tempest_cinder
      - tempest_keystone
      - tempest_heat
      - tempest_telemetry
      - rally_sanity
      - refstack_defcore
      - refstack_compute
      - refstack_object
      - refstack_platform
      - tempest_full
      - tempest_scenario
      - tempest_slow
      - patrole
      - patrole_admin
      - patrole_member
      - patrole_reader
      - networking-bgpvpn
      - networking-sfc
      - tempest_barbican
      - tempest_octavia
      - tempest_cyborg
    privileged: 'false'
    network: bridge
    exclude:
      - tag: latest
        test: refstack_defcore
      - tag: latest
        test: networking-bgpvpn
      - tag: latest
        test: networking-sfc
      - tag: latest
        test: patrole
      - tag: wallaby
        test: refstack_defcore
      - tag: wallaby
        test: networking-bgpvpn
      - tag: wallaby
        test: networking-sfc
      - tag: wallaby
        test: patrole
      - tag: leguer
        test: refstack_defcore
      - tag: leguer
        test: networking-bgpvpn
      - tag: leguer
        test: networking-sfc
      - tag: leguer
        test: patrole
      - tag: kali
        test: refstack_defcore
      - tag: kali
        test: networking-bgpvpn
      - tag: kali
        test: networking-sfc
      - tag: kali
        test: patrole_admin
      - tag: kali
        test: patrole_member
      - tag: kali
        test: patrole_reader
      - tag: jerma
        test: refstack_defcore
      - tag: jerma
        test: networking-bgpvpn
      - tag: jerma
        test: networking-sfc
      - tag: jerma
        test: patrole_admin
      - tag: jerma
        test: patrole_member
      - tag: jerma
        test: patrole_reader
      - tag: jerma
        test: tempest_cyborg
      - tag: arm-latest
        test: refstack_defcore
      - tag: arm-latest
        test: networking-bgpvpn
      - tag: arm-latest
        test: networking-sfc
      - tag: arm-latest
        test: patrole
      - tag: arm-wallaby
        test: refstack_defcore
      - tag: arm-wallaby
        test: networking-bgpvpn
      - tag: arm-wallaby
        test: networking-sfc
      - tag: arm-wallaby
        test: patrole
      - tag: arm-leguer
        test: refstack_defcore
      - tag: arm-leguer
        test: networking-bgpvpn
      - tag: arm-leguer
        test: networking-sfc
      - tag: arm-leguer
        test: patrole
      - tag: arm-kali
        test: refstack_defcore
      - tag: arm-kali
        test: networking-bgpvpn
      - tag: arm-kali
        test: networking-sfc
      - tag: arm-kali
        test: patrole_admin
      - tag: arm-kali
        test: patrole_member
      - tag: arm-kali
        test: patrole_reader
      - tag: arm-jerma
        test: refstack_defcore
      - tag: arm-jerma
        test: networking-bgpvpn
      - tag: arm-jerma
        test: networking-sfc
      - tag: arm-jerma
        test: patrole_admin
      - tag: arm-jerma
        test: patrole_member
      - tag: arm-jerma
        test: patrole_reader
      - tag: arm-jerma
        test: tempest_cyborg
      - tag: arm64-latest
        test: refstack_defcore
      - tag: arm64-latest
        test: networking-bgpvpn
      - tag: arm64-latest
        test: networking-sfc
      - tag: arm64-latest
        test: patrole
      - tag: arm64-wallaby
        test: refstack_defcore
      - tag: arm64-wallaby
        test: networking-bgpvpn
      - tag: arm64-wallaby
        test: networking-sfc
      - tag: arm64-wallaby
        test: patrole
      - tag: arm64-leguer
        test: refstack_defcore
      - tag: arm64-leguer
        test: networking-bgpvpn
      - tag: arm64-leguer
        test: networking-sfc
      - tag: arm64-leguer
        test: patrole
      - tag: arm64-kali
        test: refstack_defcore
      - tag: arm64-kali
        test: networking-bgpvpn
      - tag: arm64-kali
        test: networking-sfc
      - tag: arm64-kali
        test: patrole_admin
      - tag: arm64-kali
        test: patrole_member
      - tag: arm64-kali
        test: patrole_reader
      - tag: arm64-jerma
        test: refstack_defcore
      - tag: arm64-jerma
        test: networking-bgpvpn
      - tag: arm64-jerma
        test: networking-sfc
      - tag: arm64-jerma
        test: patrole_admin
      - tag: arm64-jerma
        test: patrole_member
      - tag: arm64-jerma
        test: patrole_reader
      - tag: arm64-jerma
        test: tempest_cyborg
    jobs:
      - 'functest-pi-ollivier-functest-smoke-{tag}-{test}-run'

- job-template:
    name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-{test}-run'
    parameters:
      - functest-pi-slave:
          slave: '{slave}'
      - functest-pi-build_tag:
          build_tag: ''
      - functest-pi-EXTERNAL_NETWORK:
          EXTERNAL_NETWORK: public
      - functest-pi-VOLUME_DEVICE_NAME:
          VOLUME_DEVICE_NAME: sdb
      - functest-pi-IMAGE_PROPERTIES:
          IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
    builders:
      - functest-pi-run-containers:
          <<: *functest-pi-run-containers

- project:
    name: 'functest-pi-ollivier-functest-smoke-cntt'
    <<: *functest-pi-params
    volumes:
      - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
      - /home/opnfv/functest/images:/home/opnfv/functest/images
    env:
      - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
      - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
      - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
    container: 'functest-smoke-cntt'
    test:
      - tempest_neutron_cntt
      - tempest_cinder_cntt
      - tempest_keystone_cntt
      - tempest_heat_cntt
      - rally_sanity_cntt
      - tempest_full_cntt
      - tempest_scenario_cntt
      - tempest_slow_cntt
    privileged: 'false'
    network: bridge
    jobs:
      - 'functest-pi-ollivier-functest-smoke-cntt-{tag}-{test}-run'

- job-template:
    name: 'functest-pi-ollivier-functest-benchmarking-{tag}-{test}-run'
    parameters:
      - functest-pi-slave:
          slave: '{slave}'
      - functest-pi-build_tag:
          build_tag: ''
      - functest-pi-EXTERNAL_NETWORK:
          EXTERNAL_NETWORK: public
      - functest-pi-VOLUME_DEVICE_NAME:
          VOLUME_DEVICE_NAME: sdb
      - functest-pi-IMAGE_PROPERTIES:
          IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
    builders:
      - functest-pi-run-containers:
          <<: *functest-pi-run-containers

- project:
    name: 'functest-pi-ollivier-functest-benchmarking'
    <<: *functest-pi-params
    volumes:
      - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
      - /home/opnfv/functest/images:/home/opnfv/functest/images
    env:
      - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
      - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
      - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
    container: 'functest-benchmarking'
    test:
      - rally_full
      - rally_jobs
      - vmtp
      - shaker
    privileged: 'false'
    network: bridge
    jobs:
      - 'functest-pi-ollivier-functest-benchmarking-{tag}-{test}-run'

- job-template:
    name: 'functest-pi-ollivier-functest-benchmarking-cntt-{tag}-{test}-run'
    parameters:
      - functest-pi-slave:
          slave: '{slave}'
      - functest-pi-build_tag:
          build_tag: ''
      - functest-pi-EXTERNAL_NETWORK:
          EXTERNAL_NETWORK: public
      - functest-pi-VOLUME_DEVICE_NAME:
          VOLUME_DEVICE_NAME: sdb
      - functest-pi-IMAGE_PROPERTIES:
          IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
    builders:
      - functest-pi-run-containers:
          <<: *functest-pi-run-containers

- project:
    name: 'functest-pi-ollivier-functest-benchmarking-cntt'
    <<: *functest-pi-params
    volumes:
      - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
      - /home/opnfv/functest/images:/home/opnfv/functest/images
    env:
      - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
      - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
      - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
    container: 'functest-benchmarking-cntt'
    test:
      - rally_full_cntt
      - rally_jobs_cntt
    privileged: 'false'
    network: bridge
    jobs:
      - 'functest-pi-ollivier-functest-benchmarking-cntt-{tag}-{test}-run'

- job-template:
    name: 'functest-pi-ollivier-functest-vnf-{tag}-{test}-run'
    parameters:
      - functest-pi-slave:
          slave: '{slave}'
      - functest-pi-build_tag:
          build_tag: ''
      - functest-pi-EXTERNAL_NETWORK:
          EXTERNAL_NETWORK: public
      - functest-pi-VOLUME_DEVICE_NAME:
          VOLUME_DEVICE_NAME: sdb
      - functest-pi-IMAGE_PROPERTIES:
          IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
    builders:
      - functest-pi-run-containers:
          <<: *functest-pi-run-containers

- project:
    name: 'functest-pi-ollivier-functest-vnf'
    <<: *functest-pi-params
    volumes:
      - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
      - /home/opnfv/functest/images:/home/opnfv/functest/images
    env:
      - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
      - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
      - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
    container: 'functest-vnf'
    test:
      - cloudify
      - cloudify_ims
      - heat_ims
      - vyos_vrouter
      - juju_epc
    privileged: 'false'
    network: bridge
    jobs:
      - 'functest-pi-ollivier-functest-vnf-{tag}-{test}-run'

- builder:
    name: functest-pi-zip
    builders:
      - shell: |
          set +x
          volumes=;
          if [ "{volumes}" != "None" ]; then
            for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); do volumes="-v $i $volumes"; done
          fi
          env=;
          if [ "{env}" != "None" ]; then
            for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); do env="-e $i $env"; done
          fi
          [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
          if [ "{repo}" = "_" ]; then
            image={container}:{tag}
          elif [ "{port}" = "None" ]; then
            image={repo}/{container}:{tag}
          else
            image={repo}:{port}/{container}:{tag}
          fi
          sudo docker run --rm \
            $volumes \
            $env \
            -e S3_ENDPOINT_URL=https://storage.googleapis.com \
            -e S3_DST_URL=s3://artifacts.opnfv.org/functest \
            -e HTTP_DST_URL=http://artifacts.opnfv.org/functest \
            -v /home/opnfv/functest/.boto:/root/.boto \
            -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
            -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
            -e BUILD_TAG=$BUILD_TAG \
            -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
            $image zip_campaign

- job-template:
    name: 'functest-pi-{tag}-zip'
    parameters:
      - functest-pi-slave:
          slave: '{slave}'
      - functest-pi-build_tag:
          build_tag: ''
      - functest-pi-EXTERNAL_NETWORK:
          EXTERNAL_NETWORK: public
      - functest-pi-VOLUME_DEVICE_NAME:
          VOLUME_DEVICE_NAME: sdb
      - functest-pi-IMAGE_PROPERTIES:
          IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
    builders:
      - functest-pi-zip:
          <<: *functest-pi-containers
          volumes: '{volumes}'
          env: '{env}'

- project:
    name: 'functest-pi-{tag}-zip'
    <<: *functest-pi-params
    volumes:
      - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
      - /home/opnfv/functest/images:/home/opnfv/functest/images
    env:
      - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
      - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
      - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
    container: 'functest-healthcheck'
    jobs:
      - 'functest-pi-{tag}-zip'

- job-template:
    name: 'functest-pi-{tag}-daily'
    project-type: multijob
    triggers:
      - timed: '@weekly'
    parameters:
      - functest-pi-slave:
          slave: '{slave}'
      - functest-pi-build_tag:
          build_tag: ''
      - functest-pi-EXTERNAL_NETWORK:
          EXTERNAL_NETWORK: public
      - functest-pi-VOLUME_DEVICE_NAME:
          VOLUME_DEVICE_NAME: sdb
      - functest-pi-IMAGE_PROPERTIES:
          IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
    # PyYAML and yamllint differ here
    # see https://github.com/yaml/pyyaml/issues/234
    # yamllint disable rule:indentation
    properties:
      - build-blocker:
          blocking-jobs:
          - ^functest-(pi-)*{tag}-(daily|docker|review)$
    # yamllint enable rule:indentation
    builders:
      - multijob:
          name: remove former images
          projects:
            - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-rmi'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-rmi'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-rmi'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-benchmarking-{tag}-rmi'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-benchmarking-cntt-{tag}-rmi'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-vnf-{tag}-rmi'
              <<: *functest-pi-jobs
      - multijob:
          name: pull containers
          projects:
            - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-pull'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-pull'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-pull'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-benchmarking-{tag}-pull'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-benchmarking-cntt-{tag}-pull'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-vnf-{tag}-pull'
              <<: *functest-pi-jobs
      - multijob:
          name: ollivier/functest-healthcheck:{tag}
          projects:
            - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-connection_check-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-tenantnetwork1-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-tenantnetwork2-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-vmready1-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-vmready2-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-singlevm1-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-singlevm2-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-vping_ssh-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-vping_userdata-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-cinder_test-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-odl-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-tempest_smoke-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-tempest_horizon-run'
              <<: *functest-pi-jobs
      - multijob:
          name: ollivier/functest-smoke:{tag}
          projects:
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_neutron-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_cinder-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_keystone-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_heat-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_telemetry-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-rally_sanity-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-refstack_defcore-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-refstack_compute-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-refstack_object-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-refstack_platform-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_full-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_scenario-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_slow-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-patrole-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-patrole_admin-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-patrole_member-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-patrole_reader-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-networking-bgpvpn-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-networking-sfc-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_barbican-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_octavia-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_cyborg-run'
              <<: *functest-pi-jobs
      - multijob:
          name: ollivier/functest-smoke-cntt:{tag}
          projects:
            - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-tempest_neutron_cntt-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-tempest_cinder_cntt-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-tempest_keystone_cntt-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-tempest_heat_cntt-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-rally_sanity_cntt-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-tempest_full_cntt-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-tempest_scenario_cntt-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-tempest_slow_cntt-run'
              <<: *functest-pi-jobs
      - multijob:
          name: ollivier/functest-benchmarking:{tag}
          projects:
            - name: 'functest-pi-ollivier-functest-benchmarking-{tag}-rally_full-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-benchmarking-{tag}-rally_jobs-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-benchmarking-{tag}-vmtp-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-benchmarking-{tag}-shaker-run'
              <<: *functest-pi-jobs
      - multijob:
          name: ollivier/functest-benchmarking-cntt:{tag}
          projects:
            - name: 'functest-pi-ollivier-functest-benchmarking-cntt-{tag}-rally_full_cntt-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-benchmarking-cntt-{tag}-rally_jobs_cntt-run'
              <<: *functest-pi-jobs
      - multijob:
          name: ollivier/functest-vnf:{tag}
          projects:
            - name: 'functest-pi-ollivier-functest-vnf-{tag}-cloudify-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-vnf-{tag}-cloudify_ims-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-vnf-{tag}-heat_ims-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-vnf-{tag}-vyos_vrouter-run'
              <<: *functest-pi-jobs
            - name: 'functest-pi-ollivier-functest-vnf-{tag}-juju_epc-run'
              <<: *functest-pi-jobs
      - multijob:
          name: dump all campaign data
          projects:
            - name: 'functest-pi-{tag}-zip'
              <<: *functest-pi-jobs

- project:
    name: 'functest-pi-daily'
    <<: *functest-pi-params
    jobs:
      - 'functest-pi-{tag}-daily'

- view:
    name: functest-pi
    view-type: list
    columns:
      - status
      - weather
      - job
      - last-success
      - last-failure
      - last-duration
    regex: ^functest-pi-[a-z-0-9.]+-daily$