---
# voltha 2.x tests
# [NOTE]
#   o md5sum(master) can be used to locate branch/release variants of a job.

- project:
    name: voltha-e2e-master

    project-name: '{name}'
    manualBranch: ''
    olts: 1
    onus: 1
    pons: 1
    withAlarms: true
    make-target-failtest: bbsim-failurescenarios
    make-target-errortest: bbsim-errorscenarios
    make-target-alarmtest: bbsim-alarms-kind
    make-target-multipleolt: bbsim-multiolt-kind
    make-target-1t4gemtest: 1t4gem-openonu-go-adapter-test
    make-target-1t8gemtest: 1t8gem-openonu-go-adapter-test
    make-target-reconciletest: reconcile-openonu-go-adapter-test-att
    make-target-reconciledttest: reconcile-openonu-go-adapter-test-dt
    make-target-reconciletttest: reconcile-openonu-go-adapter-test-tt

    jobs:
      - 'voltha-periodic-test':
          name: 'periodic-voltha-pm-data-test-bbsim'
          code-branch: 'master'
          extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master --set kafka.externalAccess.enabled=true,kafka.externalAccess.service.type=NodePort,kafka.externalAccess.service.nodePorts[0]=30201,kafka.externalAccess.service.domain=127.0.0.1'
          time-trigger: "H H/23 * * *"
          logLevel: 'DEBUG'
          testTargets: |
            - target: voltha-pm-data-single-kind-att
              workflow: att
              flags: ""
              teardown: true
              logging: true
            - target: voltha-pm-data-single-kind-dt
              workflow: dt
              flags: ""
              teardown: true
              logging: true
            - target: voltha-pm-data-single-kind-tt
              workflow: tt
              flags: ""
              teardown: true
              logging: true
          timeout: 140

      - 'voltha-periodic-test':
          name: 'periodic-voltha-multiple-olts-pm-data-test-bbsim'
          code-branch: 'master'
          extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master --set onu=2,pon=2 --set kafka.externalAccess.enabled=true,kafka.externalAccess.service.type=NodePort,kafka.externalAccess.service.nodePorts[0]=30201,kafka.externalAccess.service.domain=127.0.0.1'
          olts: 2
          timeout: 180
          logLevel: 'DEBUG'
          testTargets: |
            - target: voltha-pm-data-multiolt-kind-att
              workflow: att
              flags: ""
              teardown: true
              logging: true
            - target: voltha-pm-data-multiolt-kind-dt
              workflow: dt
              flags: ""
              teardown: true
              logging: true
            - target: voltha-pm-data-multiolt-kind-tt
              workflow: tt
              flags: ""
              teardown: true
              logging: true
          time-trigger: "H H/23 * * *"

      - 'voltha-periodic-test':
          name: 'periodic-voltha-combined-vgc'
          code-branch: 'master'
          extraHelmFlags: '--set global.image_tag=master --set kafka.externalAccess.enabled=true,kafka.externalAccess.service.type=NodePort,kafka.externalAccess.service.nodePorts[0]=30201,kafka.externalAccess.service.domain=127.0.0.1'
          time-trigger: "H H/23 * * *"
          logLevel: 'DEBUG'
          testTargets: |
            - target: sanity-kind-dt-vgc
              workflow: dt
              flags: ""
              teardown: true
              logging: true
            - target: functional-single-kind-dt-vgc
              workflow: dt
              flags: ""
              teardown: true
              logging: true
            - target: sanity-kind-dt-fttb-vgc
              workflow: dt
              flags: ""
              teardown: true
              logging: true
            - target: bbsim-failurescenarios-dt-vgc
              workflow: dt
              flags: ""
              teardown: true
              logging: true
          timeout: 140
      - 'voltha-periodic-test':
          name: 'periodic-voltha-combined-vgc-multi-olt'
          code-branch: 'master'
          olts: 2
          extraHelmFlags: '--set global.image_tag=master --set kafka.externalAccess.enabled=true,kafka.externalAccess.service.type=NodePort,kafka.externalAccess.service.nodePorts[0]=30201,kafka.externalAccess.service.domain=127.0.0.1'
          time-trigger: "H H/23 * * *"
          logLevel: 'DEBUG'
          testTargets: |
            - target: multiolt-kind-dt-vgc
              workflow: dt
              flags: "--set onu=2,pon=2"
              teardown: true
              logging: true
            - target: bbsim-multiolt-kind-dt-vgc
              workflow: dt
              flags: ""
              teardown: true
              logging: true
          timeout: 140

      # -----------------------------------------------------------------------
      # md5sum(master): c606493da6ee7cbb18ca8aee97ea2957
      # -----------------------------------------------------------------------
      - 'voltha-periodic-test':
          name: 'periodic-voltha-test-bbsim'
          code-branch   : 'master'
          extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master --set onos-classic.replicas=3,onos-classic.atomix.replicas=3 --set voltha.onos_classic.replicas=3 '
          logLevel: 'DEBUG'
          pipeline-script: 'voltha/bbsim-tests.groovy'
          pipeline-branch: 'master'
          time-trigger: "H H/23 * * *"         # Build daily at 11pm
          testTargets: |
            - target: functional-single-kind
              workflow: att
              flags: ""
              teardown: true
              logging: true
            - target: bbsim-alarms-kind
              workflow: att
              flags: ""
              teardown: false
              logging: true
            - target: bbsim-failurescenarios
              workflow: att
              flags: ""
              teardown: false
              logging: true
            - target: bbsim-errorscenarios
              workflow: att
              flags: ""
              teardown: false
              logging: true
            - target: onos-ha-test
              workflow: att
              flags: ""
              teardown: false
              logging: true

      - 'voltha-periodic-test':
          name: 'periodic-voltha-sanity-test-multi-runs'
          code-branch: 'master'
          time-trigger: "H H/23 * * *"
          extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master --set onu=2,pon=2'
          testTargets: |
            - target: sanity-kind
              workflow: att
              flags: ""
              teardown: true
              logging: true
            - target: sanity-kind
              workflow: att
              flags: ""
              teardown: false
              logging: true
            - target: sanity-kind
              workflow: att
              flags: ""
              teardown: false
              logging: true
            - target: sanity-kind
              workflow: att
              flags: ""
              teardown: false
              logging: true
            - target: sanity-kind
              workflow: att
              flags: ""
              teardown: false
              logging: true

      # -----------------------------------------------------------------------
      # md5sum(master): eff05a324e94fdef076b2d5f7cb4f80f
      # -----------------------------------------------------------------------
      - 'voltha-periodic-test':
          name: 'periodic-voltha-dt-test-bbsim-master'
          # build-node: 'ubuntu18.04-basebuild-4c-8g'
          build-node: 'ubuntu18.04-basebuild-8c-15g'
          pipeline-script: 'voltha/bbsim-tests.groovy'
          pipeline-branch: 'master'
          code-branch: 'master'
          time-trigger: "@daily"
          testTargets: |
            - target: functional-single-kind-dt
              workflow: dt
              flags: ""
              teardown: true
              logging: true
            - target: bbsim-failurescenarios-dt
              workflow: dt
              flags: ""
              teardown: false
              logging: true

      # -----------------------------------------------------------------------
      # md5sum(master): 6a1a43e203f8b5d4ad0c3d9f73116045
      # -----------------------------------------------------------------------
      - 'voltha-periodic-test':
          name: 'periodic-voltha-dt-fttb-test-bbsim-master'
          # build-node: 'ubuntu18.04-basebuild-4c-8g'
          build-node: 'ubuntu18.04-basebuild-8c-15g'
          code-branch: 'master'
          time-trigger: "H H/23 * * *"
          extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master --set voltha-adapter-openonu.adapter_open_onu.uni_port_mask=0x00FF --set onu=2'
          testTargets: |
            - target: sanity-kind-dt-fttb
              workflow: dt-fttb
              flags: ""
              teardown: true
              logging: true

# [EOF]
