# Run on master CI builds
trigger:
  branches:
    include:
    - master

pr: none

jobs:
- job: RichCodeNav_Indexing
  pool:
    name: NetCorePublic-Pool
    queue: BuildPool.Windows.10.Amd64.Open
  variables:
    EnableRichCodeNavigation: true
  timeoutInMinutes: 200

  steps:
    - script: eng/cibuild.cmd -configuration Debug -prepareMachine
      displayName: Build
      
    - task: UseDotNet@2
      displayName: 'Use .NET Core sdk'
      inputs:
        packageType: sdk
        version: 2.1.503

    - task: RichCodeNavIndexer@0
      displayName: RichCodeNav Upload
      inputs:
        languages: 'csharp'
        environment: production
        richNavLogOutputDirectory: $(Build.SourcesDirectory)/artifacts/bin
      continueOnError: true

schedules:
- cron: "0 0 * * *"
  displayName: Daily midnight RichNav indexer run
  branches:
    include:
    - master

jobs:
- job: RichCodeNav_Indexing
  pool:
    name: NetCorePublic-Pool
    queue: BuildPool.Windows.10.Amd64.Open
  variables:
    EnableRichCodeNavigation: true
  timeoutInMinutes: 200

  steps:
    - script: eng/cibuild.cmd -configuration Debug -prepareMachine
      displayName: Build
      
    - task: UseDotNet@2
      displayName: 'Use .NET Core sdk'
      inputs:
        packageType: sdk
        version: 2.1.503

    - task: RichCodeNavIndexer@0
      displayName: RichCodeNav Upload
      inputs:
        languages: 'csharp'
        environment: production
        richNavLogOutputDirectory: $(Build.SourcesDirectory)/artifacts/bin
      continueOnError: true

Change RichNav to run daily
Change RichNav to run daily