From 3c130795e36014c432dbe66edfa753ac934d710f Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman <rjeffman@redhat.com> Date: Tue, 15 Feb 2022 09:12:26 -0300 Subject: [PATCH] build containers: Allow setting of Python version used. Currently the pipeline used to create test containers is using Python 3.6.15, and Ansible 2.12 requires, at least, Python 3.8. This change adds a new parameter to build container template, `python_version`, which is set by default to '3.x', meaning it will use the latest Python version available (for version 3) if the parameter is not explicitly set. --- tests/azure/templates/build_container.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/azure/templates/build_container.yml b/tests/azure/templates/build_container.yml index b474c964..7d5c1fb0 100644 --- a/tests/azure/templates/build_container.yml +++ b/tests/azure/templates/build_container.yml @@ -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 -- GitLab