From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.401.1664211731540990589 for ; Mon, 26 Sep 2022 10:02:11 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LPYXVKuG; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: osteffen@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664211730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=W10Gs8hj0RiIZJYws1BUerw8iIAN9KGEul6xxgXGJJQ=; b=LPYXVKuGgPjHYnnlgLbc98NofXNwZ8AbfKQc2VYQ/TVoB5wDaiAbjJeJTVdEid+IDXYB0P QQvO09C7iasa9TIlpvH9N9jaJ/hscsAI+Qp9yfQfcQnd2lgU8skzljXPOtUXpMA2y943c/ ddtt3fuGNy9TsmYkm5laum0Bdcmpdr0= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-620-23P1AekyMr6HLXbq20Vq4A-1; Mon, 26 Sep 2022 12:31:35 -0400 X-MC-Unique: 23P1AekyMr6HLXbq20Vq4A-1 Received: by mail-lf1-f69.google.com with SMTP id c17-20020a056512105100b0049bbc0135easo2598618lfb.6 for ; Mon, 26 Sep 2022 09:31:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date; bh=W10Gs8hj0RiIZJYws1BUerw8iIAN9KGEul6xxgXGJJQ=; b=i0HvL0AmoCoNj436D2RLU0XBLvbFozjBy5AO+n6ZPHBNDvGRGOz0PXmJNO9B5W45W8 8/dtwdpXaffg4glwmfRUrc9IhS+Wl+Z7cSuaWZJD+zJWYtF6eoMBHAVyFjnnkHyB1Rn+ 25CPaNW7A0+OdyY6YUahHwxl9+hJLKZgzqzOXKVA/su34bTvqo1Fyi3fJv6Klsv3c5fP XI/GNsU74x/c9oZU4m6vnctJcxQQHKk2XMTBUk/bD+65gK93FQgkQyMXb9+z60pU5kxK YiPkebwmYAV8dBj8pFW88G5AjiCRxSqceEsDf5Gl/SY33/lv/f7HohJSn9koUX7P1O0n Qk2g== X-Gm-Message-State: ACrzQf3N7bpWUaBYlrMh3HsTh95B/+vevkhR1Apr3+KeE6omgqQKM/UB JXxQrkJojqrmHP1QjJIsESGJSAFs560UAm1zgcjdYJVW+bUM2xxDhfSClIidQhDtnmcmPaQAbkD 3zSkBseVbaSkkofQBlQvZjsN3YF5lSg== X-Received: by 2002:a05:6512:39cb:b0:49a:d1e1:16df with SMTP id k11-20020a05651239cb00b0049ad1e116dfmr9410333lfu.438.1664209893609; Mon, 26 Sep 2022 09:31:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7wV1uqGgDfUwN9sRxgWLZC3f+ejr826GB1lpoiAx5GJvDvA2IZpE5s6uvgFxIp52ZLXQJnVhA8xaTRWFrenpo= X-Received: by 2002:a05:6512:39cb:b0:49a:d1e1:16df with SMTP id k11-20020a05651239cb00b0049ad1e116dfmr9410312lfu.438.1664209893423; Mon, 26 Sep 2022 09:31:33 -0700 (PDT) Received: from 567203818698 named unknown by gmailapi.google.com with HTTPREST; Mon, 26 Sep 2022 09:31:32 -0700 From: "Oliver Steffen" X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926163129.85032-1-osteffen@redhat.com> References: <20220926163129.85032-1-osteffen@redhat.com> MIME-Version: 1.0 Date: Mon, 26 Sep 2022 09:31:32 -0700 Message-ID: Subject: [PATCH v6 1/5] CI: make Python version configurable To: devel@edk2.groups.io Cc: Oliver Steffen , Andrew Fish , Ard Biesheuvel , Bob Feng , Gerd Hoffmann , Jiewen Yao , Jordan Justen , Leif Lindholm , Liming Gao , Michael D Kinney , Michael Kubacki , Ray Ni , Sami Mujawar , Sean Brogan , Yuwei Chen , Pawel Polawski X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Add a new parameter "usePythonVersion" to the CI job templates. This makes it possible to specify the version of Python to use. The default value is ">=3.10.6". If '' is specified, Python will not be downloaded at runtime and the one provided by the VM/container image will be used. Signed-off-by: Oliver Steffen --- .azurepipelines/templates/platform-build-run-steps.yml | 6 +++++- .azurepipelines/templates/pr-gate-build-job.yml | 2 ++ .azurepipelines/templates/pr-gate-steps.yml | 6 ++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.azurepipelines/templates/platform-build-run-steps.yml b/.azurepipelines/templates/platform-build-run-steps.yml index 40a31a509fc5..6c9189a20fde 100644 --- a/.azurepipelines/templates/platform-build-run-steps.yml +++ b/.azurepipelines/templates/platform-build-run-steps.yml @@ -34,6 +34,9 @@ parameters: - name: extra_install_step type: stepList default: [] +- name: usePythonVersion + type: string + default: ">=3.10.6" steps: - checkout: self @@ -42,8 +45,9 @@ steps: - task: UsePythonVersion@0 inputs: - versionSpec: ">=3.10.6" + versionSpec: ${{ parameters.usePythonVersion }} architecture: "x64" + condition: ne('${{ parameters.usePythonVersion }}', '') - script: pip install -r pip-requirements.txt --upgrade displayName: 'Install/Upgrade pip modules' diff --git a/.azurepipelines/templates/pr-gate-build-job.yml b/.azurepipelines/templates/pr-gate-build-job.yml index 0e4ad019bf03..24926ed64984 100644 --- a/.azurepipelines/templates/pr-gate-build-job.yml +++ b/.azurepipelines/templates/pr-gate-build-job.yml @@ -12,6 +12,7 @@ parameters: tool_chain_tag: '' vm_image: '' arch_list: '' + usePythonVersion: '>=3.10.6' # Build step jobs: @@ -70,3 +71,4 @@ jobs: build_pkgs: $(Build.Pkgs) build_targets: $(Build.Targets) build_archs: ${{ parameters.arch_list }} + usePythonVersion: ${{ parameters.usePythonVersion }} diff --git a/.azurepipelines/templates/pr-gate-steps.yml b/.azurepipelines/templates/pr-gate-steps.yml index cb431e53fcd1..bf6574b33692 100644 --- a/.azurepipelines/templates/pr-gate-steps.yml +++ b/.azurepipelines/templates/pr-gate-steps.yml @@ -12,6 +12,7 @@ parameters: build_pkgs: '' build_targets: '' build_archs: '' + usePythonVersion: '>=3.10.6' steps: - checkout: self @@ -20,8 +21,9 @@ steps: - task: UsePythonVersion@0 inputs: - versionSpec: '>=3.10.6' - architecture: 'x64' + versionSpec: ${{ parameters.usePythonVersion }} + architecture: "x64" + condition: ne('${{ parameters.usePythonVersion }}', '') - script: pip install -r pip-requirements.txt --upgrade displayName: 'Install/Upgrade pip modules' -- 2.37.3