parameters:
  vmImage:

jobs:
- job: Vendor_Scripts
  displayName: Test Vendor Scripts
  pool:
    vmImage: ${{ parameters.vmImage }}
  strategy:
    maxParallel: 4
    matrix:
      ${{ if eq(parameters.vmImage, 'vs2017-win2016') }}:
        # TODO remove once vs2017-win2016 has Python 3.7
        Python37:
          python.version: '>= 3.7.0-b2'
          python.architecture: x64
      ${{ if ne(parameters.vmImage, 'vs2017-win2016' )}}:
        Python37:
          python.version: '>= 3.7'
          python.architecture: x64
  steps:
  - task: UsePythonVersion@0
    displayName: Use Python $(python.version)
    inputs:
      versionSpec: '$(python.version)'
      architecture: '$(python.architecture)'

  - template: ../steps/install-dependencies.yml

  - bash: |
      mkdir -p "$AGENT_HOMEDIRECTORY/.virtualenvs"
      mkdir -p "$WORKON_HOME"
      pip install certifi
      export GIT_SSL_CAINFO=$(python -m certifi)
      export LANG=C.UTF-8
      python -m pip install --upgrade invoke requests parver bs4 vistir towncrier
      python -m invoke vendoring.update

  - template: ./run-manifest-check.yml

parameters:
  vmImage:

jobs:
- job: Vendor_Scripts
  displayName: Test Vendor Scripts
  pool:
    vmImage: ${{ parameters.vmImage }}
  strategy:
    maxParallel: 4
    matrix:
      ${{ if eq(parameters.vmImage, 'vs2017-win2016') }}:
        Python37:
          python.version: '>= 3.7.2'
          python.architecture: x64
      ${{ if ne(parameters.vmImage, 'vs2017-win2016' )}}:
        Python37:
          python.version: '>= 3.7'
          python.architecture: x64
  steps:
  - task: UsePythonVersion@0
    displayName: Use Python $(python.version)
    inputs:
      versionSpec: '$(python.version)'
      architecture: '$(python.architecture)'

  - template: ../steps/install-dependencies.yml

  - bash: |
      mkdir -p "$AGENT_HOMEDIRECTORY/.virtualenvs"
      mkdir -p "$WORKON_HOME"
      pip install certifi
      export GIT_SSL_CAINFO=$(python -m certifi)
      export LANG=C.UTF-8
      python -m pip install --upgrade invoke requests parver bs4 vistir towncrier pip setuptools wheel --upgrade-strategy=eager
      python -m invoke vendoring.update

  - template: ./run-manifest-check.yml

Fix vendoring script in azure pipeline
Fix vendoring script in azure pipeline

Signed-off-by: Dan Ryan <2591e5f46f28d303f9dc027d475a5c60d8dea17a@danryan.co>
