diff --git a/scripts/Test-E2E-Section3.3.ps1 b/scripts/Test-E2E-Section3.3.ps1 index 195010b..dd9fa66 100644 --- a/scripts/Test-E2E-Section3.3.ps1 +++ b/scripts/Test-E2E-Section3.3.ps1 @@ -26,6 +26,11 @@ Path to template VMX. Default: env:GITEA_CI_TEMPLATE_PATH or F:\CI\Templates\WinBuild2025\WinBuild2025.vmx +.PARAMETER GuestRepoUrl + HTTP(S) URL for guest-side clone. Must be reachable from inside the VM. + Default: https://gitea.emulab.it/Simone/nsis-plugin-nsinnounp.git + NOTE: ssh://gitea-ci alias works only on the host (SSH config), not inside the VM. + .PARAMETER SkipBaseline If set, skip baseline run and only run with -UseGitClone. @@ -51,6 +56,10 @@ param( if ($env:GITEA_CI_TEMPLATE_PATH) { $env:GITEA_CI_TEMPLATE_PATH } else { 'F:\CI\Templates\WinBuild2025\WinBuild2025.vmx' } ), + # URL for host-side clone (SSH alias works on host) + [string] $HostRepoUrl = 'ssh://gitea-ci/Simone/nsis-plugin-nsinnounp.git', + # URL for guest-side clone (must be HTTP reachable from inside VM — SSH alias not available in guest) + [string] $GuestRepoUrl = 'https://gitea.emulab.it/Simone/nsis-plugin-nsinnounp.git', [switch] $SkipBaseline, [switch] $SkipGuestClone ) @@ -61,7 +70,7 @@ $ErrorActionPreference = 'Stop' $scriptDir = Split-Path $MyInvocation.MyCommand.Path -Parent $orchestrator = Join-Path $scriptDir 'Invoke-CIJob.ps1' -# Common parameters for both runs +# Common parameters (RepoUrl set per-mode below) $commonParams = @{ Branch = $Branch TemplatePath = $TemplatePath @@ -69,7 +78,6 @@ $commonParams = @{ BuildCommand = 'python build_plugin.py --final --dist-dir dist' GuestArtifactSource = 'dist' GuestCredentialTarget = 'BuildVMGuest' - RepoUrl = 'ssh://gitea-ci/Simone/nsis-plugin-nsinnounp.git' } function Format-Elapsed { @@ -102,13 +110,17 @@ function Run-Test { $params['JobId'] = $JobId if ($UseGitClone) { $params['UseGitClone'] = $true + $params['RepoUrl'] = $script:GuestRepoUrl # HTTP URL reachable from inside VM + } else { + $params['RepoUrl'] = $script:HostRepoUrl # SSH alias — works on host } $startTime = Get-Date $exitCode = 0 try { - & $orchestrator @params + # Pipe to Out-Host so orchestrator output doesn't pollute this function's pipeline + & $orchestrator @params | Out-Host $exitCode = $LASTEXITCODE } catch {