---
# xos-integration test jobs

- project:
    name: data-model-scale

    project-name: 'data-model-scale'

    jobs:
      - 'data-model-scale'
      - 'data-migrations'

- job-template:
    id: 'data-model-scale'
    name: 'xos-data-model-scale'

    description: |
      <!-- Managed by Jenkins Job Builder -->
      Created by {id} job-template from ci-management/jjb/xos-integration-tests.yaml  <br /><br />

    properties:
      - cord-infra-properties:
          build-days-to-keep: '{build-days-to-keep}'
          artifact-num-to-keep: '{artifact-num-to-keep}'

    wrappers:
      - lf-infra-wrappers:
          build-timeout: '{build-timeout}'
          jenkins-ssh-credential: '{jenkins-ssh-credential}'

    parameters:
      - string:
         name: executorNode
         default: 'ubuntu16.04-basebuild-4c-8g'
         description: 'Name of the Jenkins node to run the job on'

      - string:
         name: manifestUrl
         default: '{gerrit-server-url}/{cord-repo-manifest}'
         description: 'URL to the repo manifest'

      - string:
         name: manifestBranch
         default: 'master'
         description: 'Name of the repo branch to use'

      - string:
         name: TestDir
         default: 'xos-scale-tests'
         description: 'Directory where tests reside'

      - string:
         name: TestCommand
         default: 'robot -d Log -T -v xos_chameleon_url:127.0.0.1 -v xos_chameleon_port:30006 -v cord_kafka:\$CORD_KAFKA_IP -v num_olts:10 -v num_onus:1 -v num_pon_ports:10 xos-scale-att-workflow.robot'
         description: 'Exact command to execute the tests including arguments'


    project-type: pipeline
    concurrent: false

    dsl: !include-raw-escape: pipeline/xos-integration-tests.groovy

    triggers:
       - timed: |
                 TZ=America/Los_Angeles
                 H 0,12 * * *

- job-template:
    id: 'data-migrations'
    name: 'xos-data-migrations-test'

    description: |
      <!-- Managed by Jenkins Job Builder -->
      Created by {id} job-template from ci-management/jjb/xos-integration-tests.yaml  <br /><br />

    properties:
      - cord-infra-properties:
          build-days-to-keep: '{build-days-to-keep}'
          artifact-num-to-keep: '{artifact-num-to-keep}'

    wrappers:
      - lf-infra-wrappers:
          build-timeout: '{build-timeout}'
          jenkins-ssh-credential: '{jenkins-ssh-credential}'

    parameters:
      - string:
         name: executorNode
         default: 'ubuntu16.04-basebuild-4c-8g'
         description: 'Name of the Jenkins node to run the job on'

      - string:
         name: manifestUrl
         default: '{gerrit-server-url}/{cord-repo-manifest}'
         description: 'URL to the repo manifest'

      - string:
         name: manifestBranch
         default: 'master'
         description: 'Name of the repo branch to use'

      - string:
         name: TestDir
         default: 'xos-migration-tests'
         description: 'Directory where tests reside'

      - string:
         name: TestCommand
         default: 'robot -d Log -T -v helm_chart:$WORKSPACE/cord/helm-charts/xos-services/simpleexampleservice xos-remove-service.robot xos-service-migrations.robot'
         description: 'Exact command to execute the tests including arguments'


    project-type: pipeline
    concurrent: false

    dsl: !include-raw-escape: pipeline/xos-integration-tests.groovy

    triggers:
      - reverse:
          jobs: 'publish-imagebuilder'
          result: 'success'
