trigger:
  branches:
    include:
     - test
     - predeploy

resources:
  repositories:
    - repository: vantec_devops
      type: git
      name: VANTEC-DEVOPS/VANTEC-DEVOPS
      ref: refs/heads/main

variables:
  project: "kuk"
  application: "vims-rdt"

jobs:
  # Deployment for branch: test
  - template: templates/vims-rdt/windows_vm_backup_and_deploy_template.yml@vantec_devops
    parameters:
      jobName: Test_Deployment
      projectName: "$(project)"
      applicationName: "$(application)"
      repoBranch: "test"
      pollName: "VIMS-KUK"
      agentName: "VIMS-KUK-TEST-40"
      serverDriveLetter: "E:"
      webrootFolderName: "WebRoot"
      projectFolderName: "rdtkuk"
      deployment_description: "KUK VIMS RDT - Branch test"

  # Deployment for branch: predeploy
  - template: templates/vims-rdt/windows_vm_backup_and_deploy_template.yml@vantec_devops
    parameters:
      jobName: Predeploy_Deployment
      projectName: "$(project)"
      applicationName: "$(application)"
      repoBranch: "predeploy"
      pollName: "VIMS-KUK"
      agentName: "VIMS-KUK-LIVE-4"
      serverDriveLetter: "F:"
      webrootFolderName: "WebRoot"
      projectFolderName: "rdtkuk-predeploy"
      deployment_description: "KUK VIMS RDT - Branch predeploy"

  # Deployment for branch: main
  - template: templates/vims-rdt/windows_vm_backup_and_deploy_template.yml@vantec_devops
    parameters:
      jobName: Production_Deployment
      projectName: "$(project)"
      applicationName: "$(application)"
      repoBranch: "main"
      pollName: "VIMS-KUK"
      agentName: "VIMS-KUK-LIVE-4"
      serverDriveLetter: "F:"
      webrootFolderName: "WebRoot"
      projectFolderName: "rdtkuk"
      deployment_description: "KUK VIMS RDT - Branch main"