Skip to content

Commit

Permalink
Merge branch 'sauce-connect/5.2' into mmt/sslkeylogfile
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol authored Aug 21, 2024
2 parents c908d00 + 970b2b4 commit 0bb6160
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 45 deletions.
12 changes: 8 additions & 4 deletions docs/secure-connections/sauce-connect-5/installation/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ defaultValue="ARM64"
    {label: 'ARM64', value: 'ARM64'},
    {label: 'x86-64', value: 'x86-64'},
  ]}>
<TabItem value="ARM64">
<TabItem value="ARM64">

```bash
curl -L -o sauce-connect.deb https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect_5.1.1.linux_arm64.deb
Expand All @@ -41,6 +41,8 @@ sudo dpkg -i sauce-connect.deb

### Edit config file

Edit the configuration file with your favorite editor:

```bash
sudo vim /etc/sauce-connect/sauce-connect.yaml
```
Expand Down Expand Up @@ -78,7 +80,7 @@ defaultValue="ARM64"
    {label: 'ARM64', value: 'ARM64'},
    {label: 'x86-64', value: 'x86-64'},
  ]}>
<TabItem value="ARM64">
<TabItem value="ARM64">

```bash
sudo rpm -i https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_linux.aarch64.rpm
Expand All @@ -96,6 +98,8 @@ sudo rpm -i https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.

### Edit config file

Edit the configuration file with your favorite editor:

```bash
sudo vim /etc/sauce-connect/sauce-connect.yaml
```
Expand Down Expand Up @@ -129,7 +133,7 @@ defaultValue="ARM64"
    {label: 'ARM64', value: 'ARM64'},
    {label: 'x86-64', value: 'x86-64'},
  ]}>
<TabItem value="ARM64">
<TabItem value="ARM64">

```bash
curl -L -o sauce-connect.tar.gz https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_linux.aarch64.tar.gz
Expand All @@ -149,7 +153,6 @@ sudo tar -C /opt/sauce-connect -xzf sauce-connect.tar.gz
</TabItem>
</Tabs>


### Link the binary

```bash
Expand Down Expand Up @@ -186,6 +189,7 @@ sudo ln -s /opt/sauce-connect/completions/sc.bash /etc/bash_completion.d/sc
This step is optional. You can use default configuration or configure Sauce Connect with flags or environment variables.
See [CLI reference](/dev/cli/sauce-connect-5/) for more details.

Edit the configuration file with your favorite editor:

```bash
vim /opt/sauce-connect/sauce-connect.yaml
Expand Down
11 changes: 10 additions & 1 deletion docs/secure-connections/sauce-connect-5/installation/macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ brew install sauce-connect
This step is optional. You can use default configuration or configure Sauce Connect with flags or environment variables.
See [CLI reference](/dev/cli/sauce-connect-5/) for more details.

Get the default configuration file:

```bash
sc run config-file > sauce-connect.yaml
```

Edit the configuration file with your favorite editor:

```bash
vim sauce-connect.yaml
```
Expand Down Expand Up @@ -61,7 +69,6 @@ sudo ln -s /opt/sauce-connect/sc /usr/local/bin/sc

### Add completion


<Tabs
defaultValue="Zsh"
  values={[
Expand Down Expand Up @@ -89,6 +96,8 @@ echo 'source <(sc completion bash)' >>~/.bash_profile
This step is optional. You can use default configuration or configure Sauce Connect with flags or environment variables.
See [CLI reference](/dev/cli/sauce-connect-5/) for more details.

Edit the configuration file with your favorite editor:

```bash
vim /opt/sauce-connect/sauce-connect.yaml
```
Expand Down
110 changes: 70 additions & 40 deletions docs/secure-connections/sauce-connect-5/installation/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,75 +8,105 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

### Unpack the zip file
## With winget

<Tabs
defaultValue="ARM64"
  values={[
    {label: 'ARM64', value: 'ARM64'},
    {label: 'x86-64', value: 'x86-64'},
  ]}>
<TabItem value="ARM64">
On Windows 10 and newer you can install Sauce Connect with the builtin [winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/) package manager.
This is the recommended way to install Sauce Connect on Windows.

```bash
mkdir C:\sauce-connect
Invoke-WebRequest -Uri https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_windows.aarch64.zip -OutFile sauce-connect.zip
Expand-Archive -Path sauce-connect.zip -DestinationPath C:\sauce-connect
### Install

Open Terminal and run the following command to install Sauce Connect:

```powershell
winget install SauceLabs.SauceConnect
```
</TabItem>

<TabItem value="x86-64">
### Set sc alias

```bash
mkdir C:\sauce-connect
Invoke-WebRequest -Uri https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_windows.x86_64.zip -OutFile sauce-connect.zip
Expand-Archive -Path sauce-connect.zip -DestinationPath C:\sauce-connect
Sauce Connect for Windows installs the `sauce-connect` command not `sc`.
This is due to the fact that the `sc` command is already used by the system.
To work around this issue, you can set an alias for the `sauce-connect` command.

In Terminal run the following command to permanently set the `sc` alias for `sauce-connect`:

```powershell
if (-Not (Test-Path -Path $PROFILE)) {
New-Item -ItemType File -Path $PROFILE -Force
}
Add-Content -Path $PROFILE -Value "Set-Alias -Name 'sc' -Value 'sauce-connect' -Option 'AllScope' -Force"
```

</TabItem>
</Tabs>
Open a new Terminal window to use the `sc` command for Sauce Connect.

### Add the binary to PATH
### Add command completion

Add `C:\sauce-connect` to `PATH` environment variable.
In Terminal run the following script to add `sc` command completion to PowerShell:

```bash
$currentPath = [System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Machine)
$newPath = "$currentPath;C:\sauce-connect"
[System.Environment]::SetEnvironmentVariable('PATH', $newPath, [System.EnvironmentVariableTarget]::Machine)
```powershell
if (-Not (Test-Path -Path $PROFILE)) {
New-Item -ItemType File -Path $PROFILE -Force
}
Add-Content -Path $PROFILE -Value "Invoke-Expression (sauce-connect completion powershell | Out-String)"
```

### Add completion
Open a new Terminal window to use the `sc` command with completion.

### Edit config file

This step is optional. You can use default configuration or configure Sauce Connect with flags or environment variables.
See [CLI reference](/dev/cli/sauce-connect-5/) for more details.

Open PowerShell and check if you already have a profile.
Get the default configuration file:

```bash
Test-Path $PROFILE
```powershell
sc run config-file > sauce-connect.yaml
```

If the command returns `False`, create a new profile.
Edit the configuration file with your favorite editor:

```bash
New-Item -ItemType File -Path $PROFILE -Force
```powershell
notepad sauce-connect.yaml
```

Add PowerShell completion to the profile.
### Start Sauce Connect

```powershell
sc run --config-file sauce-connect.yaml
```

## With zip package

Sauce Connect provides `.zip` package that can be used on older Windows versions that do not support winget.

### Unpack the zip file

```bash
Add-Content -Path $PROFILE -Value ". C:\sauce-connect\completions\sc.ps1"
```powershell
mkdir C:\sauce-connect
Invoke-WebRequest -Uri https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_windows.x86_64.zip -OutFile sauce-connect.zip
Expand-Archive -Path sauce-connect.zip -DestinationPath C:\sauce-connect
Rename-Item -Path C:\sauce-connect\sauce-connect.exe -NewName C:\sauce-connect\sc.exe
```

### Edit config file

This step is optional. You can use default configuration or configure Sauce Connect with flags or environment variables.
See [CLI reference](/dev/cli/sauce-connect-5/) for more details.

```bash
notepad C:\sauce-connect\sauce-connect.yaml
Get the default configuration file:

```powershell
cd C:\sauce-connect
./sc.exe run config-file > sauce-connect.yaml
```

Edit the configuration file with your favorite editor:

```powershell
notepad sauce-connect.yaml
```

### Start Sauce Connect

```bash
sc.exe run --config-file C:\sauce-connect\sauce-connect.yaml
```powershell
./sc.exe run --config-file sauce-connect.yaml
```

0 comments on commit 0bb6160

Please sign in to comment.