---
# verification jobs for 'bbsim' repo

- project:
    name: bbsim
    project: '{name}'
    dest-gopath: "github.com/opencord"

    jobs:
      - 'verify-bbsim-jobs':
          branch-regexp: '{all-branches-regexp}'
      - 'verify-bbsim-jobs-voltha-2.12':
          name-extension: '-voltha-2.12'
          override-branch: 'voltha-2.12'
          branch-regexp: '^voltha-2.12$'
      - 'verify-bbsim-jobs-voltha-2.11':
          name-extension: '-voltha-2.11'
          override-branch: 'voltha-2.11'
          branch-regexp: '^voltha-2.11$'
#      - 'verify-bbsim-jobs-voltha-2.8':
#          name-extension: '-voltha-2.8'
#          override-branch: 'voltha-2.8'
#          branch-regexp: '^voltha-2.8$'
      - 'verify-bbsim-jobs-master':
          branch-regexp: '^master$'
      - 'publish-bbsim-jobs':
          branch-regexp: '{all-branches-regexp}'

- job-group:
    name: 'verify-bbsim-jobs'
    jobs:
      - 'verify-licensed'
      - 'tag-collision-reject':
          dependency-jobs: 'verify_bbsim_licensed'
      - 'make-unit-test':
          build-node: 'ubuntu18.04-basebuild-4c-8g'
          dest-gopath: "github.com/opencord"
          unit-test-targets: 'lint sca test'
          unit-test-keep-going: 'false'

#- job-group:
#    name: 'verify-bbsim-jobs-voltha-2.8'
#    jobs:
#      - 'voltha-patch-test':
#          pipeline-script: 'voltha/voltha-2.8/bbsim-tests.groovy'
#          testTargets: |
#            - target: sanity-bbsim-att
#              workflow: att
#              flags: ""
#              teardown: true
#              logging: true
#            - target: sanity-bbsim-dt
#              workflow: dt
#              flags: ""
#              teardown: true
#              logging: true
#            - target: sanity-bbsim-tt
#              workflow: tt
#              flags: ""
#              teardown: true
#              logging: true
#

- job-group:
    name: 'verify-bbsim-jobs-master'
    jobs:
      - 'voltha-patch-test':
          extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master'
          testTargets: |
            - target: sanity-bbsim-att
              workflow: att
              flags: ""
              teardown: true
              logging: true
            - target: sanity-bbsim-dt
              workflow: dt
              flags: ""
              teardown: true
              logging: true
            - target: sanity-bbsim-tt
              workflow: tt
              flags: ""
              teardown: true
              logging: true

- job-group:
    name: 'verify-bbsim-jobs-voltha-2.12'
    jobs:
      - 'voltha-patch-test':
          pipeline-script: 'voltha/voltha-2.12/bbsim-tests.groovy'
          extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master'
          testTargets: |
            - target: sanity-bbsim-att
              workflow: att
              flags: ""
              teardown: true
              logging: true
            - target: sanity-bbsim-dt
              workflow: dt
              flags: ""
              teardown: true
              logging: true
            - target: sanity-bbsim-tt
              workflow: tt
              flags: ""
              teardown: true
              logging: true

- job-group:
    name: 'verify-bbsim-jobs-voltha-2.11'
    jobs:
      - 'voltha-patch-test':
          pipeline-script: 'voltha/voltha-2.11/bbsim-tests.groovy'
          extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master'
          testTargets: |
            - target: sanity-bbsim-att
              workflow: att
              flags: ""
              teardown: true
              logging: true
            - target: sanity-bbsim-dt
              workflow: dt
              flags: ""
              teardown: true
              logging: true
            - target: sanity-bbsim-tt
              workflow: tt
              flags: ""
              teardown: true
              logging: true
              
- job-group:
    name: 'publish-bbsim-jobs'
    jobs:
      - 'docker-publish':
          maintainers: "onf-bat-admin@opennetworking.org"
          docker-repo: 'voltha'
          dependency-jobs: 'version-tag_wildcard'
      - 'github-release':
          dependency-jobs: 'version-tag_wildcard'
          github-organization: 'opencord'
          release-targets: 'release'
          artifact-glob: 'release/*'

# [EOF]
