trigger:
  batch: true
  branches:
    include:
      - master
      - '1.1'

pr:
  branches:
    include:
      - master
  paths:
    exclude:
      - docs/src/main/asciidoc/*
      - docs/src/main/asciidoc/images/*
      - README.md
      - CONTRIBUTING.md
      - ADOPTERS.md
      - LICENSE.txt
      - dco.txt
      - .github/ISSUE_TEMPLATE/*.md
      - .github/labeler.yml
      - .github/boring-cyborg.yml
      - .github/workflows/*
      - .dependabot/config.yml

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      
