File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 max-parallel : 100
1010 matrix :
1111 os : ['windows-2022']
12+ download_official_python_msi : ["true", "false"]
1213 cbsinit_repo : ['https://github.com/cloudbase/cloudbase-init']
1314 cbsinit_branch : ['master']
1415 python_version : ['3.14_4']
2930 -VCVars "automatic" ^
3031 -VSRedistDir "''" ^
3132 -CloudbaseInitRepoUrl ${{ matrix.cbsinit_repo }} ^
32- -CloudbaseInitRepoBranch ${{ matrix.cbsinit_branch }}
33+ -CloudbaseInitRepoBranch ${{ matrix.cbsinit_branch }} ^
34+ -InstallOfficialPythonMsi:$${{ matrix.download_official_python_msi }} ^
35+ -OfficialPythonMsiChecksum "C10234D0D9BD89F6F6DD55BAE28EDE0F97EE0DF4"
3336 - uses : actions/upload-artifact@v7
3437 with :
3538 name : " CloudbaseInit_${{ matrix.platform }}_${{ matrix.os }}_MSI_${{ matrix.cbsinit_branch }}"
Original file line number Diff line number Diff line change 1010 [switch ]$ClonePullInstallerRepo = $true ,
1111 [string ]$VSRedistDir = " ${ENV: ProgramFiles(x86)} \Common Files\Merge Modules" ,
1212 [string ]$SignTimestampUrl = " http://timestamp.digicert.com?alg=sha256" ,
13- [string ]$VCVars = " 2019"
13+ [string ]$VCVars = " 2019" ,
14+ [switch ]$InstallOfficialPythonMsi = $false ,
15+ [string ]$OfficialPythonMsiChecksum = " C10234D0D9BD89F6F6DD55BAE28EDE0F97EE0DF4"
1416)
1517
1618$ErrorActionPreference = " Stop"
7779
7880 $python_template_dir = join-path $cloudbaseInitInstallerDir " Python$ ( $pythonversion.replace (' .' , ' ' )) _${platform} _Template"
7981
82+ if ($InstallOfficialPythonMsi ) {
83+ if (! $OfficialPythonMsiChecksum ) {
84+ throw " Please set a OfficialPythonMsiChecksum parameter value."
85+ }
86+ Remove-Item - Recurse - Force $python_template_dir - ErrorAction SilentlyContinue
87+ DownloadInstall- PythonMsi $platform $python_template_dir $pythonversion $OfficialPythonMsiChecksum
88+ }
89+
8090 CheckCopyDir $python_template_dir $python_dir
8191
8292 # Make sure that we don't have temp files from a previous build
You can’t perform that action at this time.
0 commit comments