Skip to content

Commit

Permalink
Revert "win-installer test: revert to v5.3.0"
Browse files Browse the repository at this point in the history
This reverts commit 916b805.

Signed-off-by: Mario Loriedo <[email protected]>
  • Loading branch information
l0rd committed Dec 12, 2024
1 parent e3d2463 commit 5f79cd3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
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

0 comments on commit 5f79cd3

Please sign in to comment.