trigger:
  branches:
    include:
      - test
      - predeploy

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

variables:
  project: "rrmc"
  application: "vims-fullscreen"

jobs:
  # Deployment for branch: test
  - template: templates/vims-fullscreen/rrmc/windows_vm_deploy_ignore_git_folder_template.yml@vantec_devops
    parameters:
      jobName: Test_Deployment
      projectName: "$(project)"
      applicationName: "$(application)"
      repoBranch: "test"
      pollName: "VIMS-RRMC"
      agentName: "VIMS-RRMC-TEST"
      serverDriveLetter: "E:"
      webrootFolderName: "webroot"
      projectFolderName: "rrmc"
      deployment_description: "RRMC VIMS Full Screen branch - test"

  # Deployment for branch: predeploy
  - template: templates/vims-fullscreen/rrmc/windows_vm_backup_and_deploy_template.yml@vantec_devops
    parameters:
      jobName: Predeploy_Deployment
      projectName: "$(project)"
      applicationName: "$(application)"
      repoBranch: "predeploy"
      pollName: "VIMS-RRMC"
      agentName: "VIMS-RRMC-LIVE"
      serverDriveLetter: "E:"
      webrootFolderName: "webroot"
      projectFolderName: "rrmc-predeploy"
      deployment_description: "RRMC VIMS Full Screen branch - predeploy"

  # Deployment for branch: main
  - template: templates/vims-fullscreen/rrmc/windows_vm_backup_and_deploy_template.yml@vantec_devops
    parameters:
      jobName: Production_Deployment
      projectName: "$(project)"
      applicationName: "$(application)"
      repoBranch: "main"
      pollName: "VIMS-RRMC"
      agentName: "VIMS-RRMC-LIVE"
      serverDriveLetter: "E:"
      webrootFolderName: "webroot"
      projectFolderName: "rrmc-production"
      deployment_description: "RRMC VIMS Full Screen branch - main"
