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

- project:
    name: voltha-e2e-2.12

    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

# source: voltha-e2e.yaml
    jobs:
      - 'voltha-periodic-test':
          name: 'periodic-voltha-pm-data-test-bbsim-2.12'
          pipeline-script: 'voltha/bbsim-tests.groovy'
          pipeline-branch: 'voltha-2.12'
          code-branch: 'voltha-2.12'
          extraHelmFlags: '--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-2.12'
          pipeline-script: 'voltha/bbsim-tests.groovy'
          pipeline-branch: 'voltha-2.12'
          code-branch: 'voltha-2.12'
          extraHelmFlags: '--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 * * *"

      # -----------------------------------------------------------------------
      # md5sum(master): c606493da6ee7cbb18ca8aee97ea2957
      # -----------------------------------------------------------------------
      - 'voltha-periodic-test':
          name: 'periodic-voltha-test-bbsim-2.12'
          code-branch: 'voltha-2.12'
          logLevel: 'DEBUG'                      # force job to regenerate
          pipeline-script: 'voltha/bbsim-tests.groovy'
          pipeline-branch: 'voltha-2.12'
          time-trigger: "H H/23 * * *"
          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-2.12'
          pipeline-script: 'voltha/bbsim-tests.groovy'
          pipeline-branch: 'voltha-2.12'
          code-branch: 'voltha-2.12'
          time-trigger: "H H/23 * * *"
          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
      # -----------------------------------------------------------------------
      # https://www.lenar.io/jenkins-schedule-build-periodically/
      # -----------------------------------------------------------------------
      - 'voltha-periodic-test':
          name: 'periodic-voltha-dt-test-bbsim-2.12'
          # build-node: 'ubuntu18.04-basebuild-4c-8g'
          build-node: 'ubuntu18.04-basebuild-8c-15g'          
          pipeline-script: 'voltha/bbsim-tests.groovy'
          pipeline-branch: 'voltha-2.12'
          code-branch: 'voltha-2.12'
          time-trigger : '@daily'
          # -----------------------------------------------------------------------
          # time-trigger : "H/20 * * * *"   # every 20 min
          #          time-trigger: "@hourly"
          #          time-trigger: "@daily"
          #          time-trigger: "@weekly"
          #          time-trigger: "monthly"
          # -----------------------------------------------------------------------
          extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master '
          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-2.12'
          # build-node: 'ubuntu18.04-basebuild-4c-8g'
          build-node: 'ubuntu18.04-basebuild-8c-15g'          
          code-branch: 'VOLTHA-2.12'
          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]
