---
# kubespray installation validation job

- project:
    name: kubespray-install-test

    project-name: '{name}'

    jobs:
      - 'k8-install'

- job-template:
    id: 'k8-install'
    name: 'kubespray-multinode-install'

    description: |
      <!-- Managed by Jenkins Job Builder -->
      Created by {id} job-template from ci-management/jjb/k8install.yaml  <br /><br />
      Validation job for kubespray installation script provided to users/operators

    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: 'qa-testvm-pod'
          description: 'Name of the Jenkins node to run the job on'

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

      - string:
         name: configRepoUrl
         default: 'https://gerrit.opencord.org/pod-configs'
         description: 'The URL of the POD configs repository'

      - string:
         name: configRepoBaseDir
         default: 'pod-configs/'
         description: 'The directory inside the POD configs repository'

      - string:
         name: configRepoFile
         default: 'kubernetes-configs/flex-onf-pod1.yml'
         description: 'The deployment config file'

      - string:
         name: podName
         default: 'flex-onf-pod1'
         description: 'Name of pod'

    project-type: pipeline
    concurrent: false

    dsl: !include-raw-escape: pipeline/kubespray-install.groovy

    triggers:
       - timed: |
                 TZ=America/Los_Angeles
                 H 10 31/3 * *
