upstream CI: Update Python version when building containers.

Newer Ansible versions will require at least Python 3.8 to be used,
and the build containers pipeline was requiring Python 3.6, which is
EOL.

This patch requests the latest Python version available for the
controller, and allows it to be configured to a specific version if,
and when, needed.
This commit is contained in:
Rafael Guterres Jeffman
2022-01-17 09:31:45 -03:00
parent 998a141482
commit c89f6624b5
5 changed files with 57 additions and 53 deletions

View File

@@ -6,6 +6,9 @@ parameters:
type: string
- name: build_scenario_name
type: string
- name: python_version
type: string
default: 3.x
jobs:
- job: BuildTestImage${{ parameters.job_name_suffix }}
@@ -13,7 +16,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.6'
versionSpec: '${{ parameters.python_version }}'
- script: python -m pip install --upgrade pip setuptools wheel ansible
displayName: Install tools