trigger:
  batch: true
  branches:
    include:
      - master

pr:
  branches:
    include:
      - master
  paths:
    exclude:
      - docs/src/main/asciidoc/*
      - docs/src/main/asciidoc/images/*
      - README.md
      - CONTRIBUTING.md
      - LICENSE.txt
      - dco.txt
      - .github/ISSUE_TEMPLATE/*.md

variables:
  MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository/
  MAVEN_OPTS: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
  QUARKUS_LOCAL_REPO: $(MAVEN_CACHE_FOLDER)
  # Force everything to use VMs if the expansion pool is disabled. Otherwise send PRs to the expansion pool and everything else to the hosted VMs
  LINUX_USE_VMS: $[ or(not(variables['quarkus_expansion_enabled']), not(contains(variables['Build.SourceBranch'], '/pull/'))) ]

stages:
  - template: ci-templates/stages.yml
    parameters:
      poolSettings:
         vmImage: 'Ubuntu 16.04'
      displayPrefix: '(Azure Hosted)'
      expectUseVMs: true
  - template: ci-templates/stages.yml
    parameters:
      poolSettings:
        name: 'Expansion'
      displayPrefix: '(Expansion)'
      expectUseVMs: false      

trigger:
  batch: true
  branches:
    include:
      - master

pr:
  branches:
    include:
      - master
  paths:
    exclude:
      - docs/src/main/asciidoc/*
      - docs/src/main/asciidoc/images/*
      - README.md
      - CONTRIBUTING.md
      - LICENSE.txt
      - dco.txt
      - .github/ISSUE_TEMPLATE/*.md

variables:
  MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository/
  MAVEN_OPTS: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
  QUARKUS_LOCAL_REPO: $(MAVEN_CACHE_FOLDER)
  # Force everything to use VMs if the expansion pool is disabled. Otherwise send PRs to the expansion pool and everything else to the hosted VMs
  LINUX_USE_VMS: $[ or(eq(variables['quarkus_expansion_enabled'], 'false'), not(contains(variables['Build.SourceBranch'], '/pull/'))) ]

stages:
  - template: ci-templates/stages.yml
    parameters:
      poolSettings:
         vmImage: 'Ubuntu 16.04'
      displayPrefix: '(Azure Hosted)'
      expectUseVMs: true
  - template: ci-templates/stages.yml
    parameters:
      poolSettings:
        name: 'Expansion'
      displayPrefix: '(Expansion)'
      expectUseVMs: false      

Fix expression to disable expansion pool
Fix expression to disable expansion pool
