Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v5.3] Add a Windows Installer patch to avoid unrequested reboots #24840

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Revert "win-installer test: revert to v5.3.0"
This reverts commit 916b805.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
  • Loading branch information
l0rd authored and openshift-cherrypick-robot committed Dec 13, 2024
commit d9a47a6d875528badf842330851b845576d987bb
22 changes: 14 additions & 8 deletions contrib/cirrus/win-installer-main.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/usr/bin/env powershell

. $PSScriptRoot\win-lib.ps1
. $PSScriptRoot\..\win-installer\utils.ps1

if ($Env:CI -eq "true") {
$WIN_INST_FOLDER = "$ENV:CIRRUS_WORKING_DIR\repo\contrib\win-installer"
$RELEASE_DIR = "$ENV:CIRRUS_WORKING_DIR\repo"
} else {
$WIN_INST_FOLDER = "$PSScriptRoot\..\win-installer"
$ENV:WIN_INST_VER = "9.9.8"
$ENV:WIN_INST_VER = "9.9.9"
$RELEASE_DIR = "$PSScriptRoot\..\..\contrib\win-installer\current"
if ($null -eq $ENV:CONTAINERS_MACHINE_PROVIDER) { $ENV:CONTAINERS_MACHINE_PROVIDER = 'wsl' }
}
Expand All @@ -16,22 +17,27 @@ Push-Location $WIN_INST_FOLDER

# Build and test the windows installer

# Downlaod v5.3.1 installer as `build.ps1` uses it to build the patch
# Download v5.3.1 installer as `build.ps1` uses it to build the patch
# (podman.msp). `build.ps1` reads `$env:V531_SETUP_EXE_PATH` to get its path.
# The v5.3.1 installer is also used to test the "v5.3.1 -> current" version minor
# update (with patch).
$env:V531_SETUP_EXE_PATH = Get-Podman-Setup-From-GitHub -version "tags/v5.3.1"
if (!$env:V531_SETUP_EXE_PATH) {
$env:V531_SETUP_EXE_PATH = Get-Podman-Setup-From-GitHub -version "tags/v5.3.1"
}

# Downlaod the previous installer to test a major update (without patch)
# Download the previous installer to test a major update (without patch)
# After v5.3.2 release we should download latest instead of v5.3.0 (i.e.
# `Get-Latest-Podman-Setup-From-GitHub`)
$env:PREV_SETUP_EXE_PATH = Get-Podman-Setup-From-GitHub -version "tags/v5.3.0"
if (!$env:PREV_SETUP_EXE_PATH) {
$env:PREV_SETUP_EXE_PATH = Get-Podman-Setup-From-GitHub -version "tags/v5.3.0"
}

# Note: consumes podman-remote-release-windows_amd64.zip from repo.tar.zst
Run-Command ".\build.ps1 $Env:WIN_INST_VER dev `"$RELEASE_DIR`""

# Build a v9.9.9 installer to test an update from current to next version
Run-Command ".\build.ps1 9.9.9 dev `"$RELEASE_DIR`""
# Build a v9.9.10 installer to test an update from current to next version
$NEXT_WIN_INST_VER="9.9.10"
Run-Command ".\build.ps1 `"$NEXT_WIN_INST_VER`" dev `"$RELEASE_DIR`""

Pop-Location

Expand All @@ -41,6 +47,6 @@ $command += "-scenario all "
$command += "-provider $ENV:CONTAINERS_MACHINE_PROVIDER "
$command += "-setupExePath `"$WIN_INST_FOLDER\podman-$ENV:WIN_INST_VER-dev-setup.exe`""
$command += "-previousSetupExePath `"$env:PREV_SETUP_EXE_PATH`""
$command += "-nextSetupExePath `"$WIN_INST_FOLDER\podman-9.9.9-dev-setup.exe`""
$command += "-nextSetupExePath `"$WIN_INST_FOLDER\podman-$NEXT_WIN_INST_VER-dev-setup.exe`""
$command += "-v531SetupExePath `"$env:V531_SETUP_EXE_PATH`""
Run-Command "${command}"
12 changes: 0 additions & 12 deletions contrib/win-installer/test-installer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,6 @@ function Remove-Podman-Machine-Conf {
Write-Host "Deletion successful!`n"
}

function Get-Latest-Podman-Setup-From-GitHub {
$tag = "5.3.0"
Write-Host "Downloading the $tag Podman windows setup from GitHub..."
$downloadUrl = "https://github.com/containers/podman/releases/download/v$tag/podman-$tag-setup.exe"
Write-Host "Downloading URL: $downloadUrl"
$destinationPath = "$PSScriptRoot\podman-$tag-setup.exe"
Write-Host "Destination Path: $destinationPath"
Invoke-WebRequest -Uri $downloadUrl -OutFile $destinationPath
Write-Host "Command completed successfully!`n"
return $destinationPath
}

function Test-Installation {
param (
[ValidateSet("wsl", "hyperv")]
Expand Down
Loading