Skip to content

Commit

Permalink
Merge branch '8.15' into update-version-next-8.15.4
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrehilbert authored Oct 18, 2024
2 parents 1d1938a + cd7202b commit 4bc4dc6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .agent-versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"8.15.1",
"8.14.3",
"8.13.4",
"7.17.24",
"7.17.24-SNAPSHOT"
"7.17.24"
]
}
8 changes: 5 additions & 3 deletions pkg/testing/runner/windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ func (WindowsRunner) Prepare(ctx context.Context, sshClient SSHClient, logger Lo
// install chocolatey
logger.Logf("Installing chocolatey")
chocoInstall := `"[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))"`
stdOut, errOut, err := sshRunPowershell(ctx, sshClient, chocoInstall)
updateCtx, updateCancel := context.WithTimeout(ctx, 3*time.Minute)
defer updateCancel()
stdOut, errOut, err := sshRunPowershell(updateCtx, sshClient, chocoInstall)
if err != nil {
return fmt.Errorf("failed to install chocolatey: %w (stdout: %s, stderr: %s)", err, stdOut, errOut)
}
Expand Down Expand Up @@ -234,12 +236,12 @@ func (WindowsRunner) Diagnostics(ctx context.Context, sshClient SSHClient, logge
}

func sshRunPowershell(ctx context.Context, sshClient SSHClient, cmd string) ([]byte, []byte, error) {
return sshClient.Exec(ctx, "powershell", []string{
return sshClient.ExecWithRetry(ctx, "powershell", []string{
"-NoProfile",
"-InputFormat", "None",
"-ExecutionPolicy", "Bypass",
"-Command", cmd,
}, nil)
}, 15*time.Second)
}

func toPowershellScript(agentVersion string, prefix string, verbose bool, tests []string, env map[string]string) string {
Expand Down

0 comments on commit 4bc4dc6

Please sign in to comment.