Skip to content

Commit

Permalink
Merge pull request #810 from jenkinsci/no-cygwin-in-batch
Browse files Browse the repository at this point in the history
remove the need for cygwin
  • Loading branch information
jtnord committed Jul 5, 2022
2 parents be0a837 + 1e6ce91 commit 2524148
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions vars.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ set JENKINS_JAVA_OPTS=-Xmx1280m
@REM Jenkins binds to 0.0.0.0 (OMG) so we can use any network but the docker network.
@REM but we may as well use the default network
@echo off
FOR /F "tokens=* USEBACKQ" %%F IN (`netsh interface ipv4 show addresses "vEthernet (WSL)" ^| grep "IP Address:" ^| gawk '{print $3}'`) DO (
FOR /f "tokens=3" %%F in ('netsh interface ipv4 show addresses "vEthernet (WSL)" ^| findstr /c:"IP Address:"') DO (
SET IP=%%F
)
IF NOT DEFINED IP (
echo "*** ERROR could not find the docker interface - is docker started?"
exit /b 1
)

@echo on
set SELENIUM_PROXY_HOSTNAME=%IP%
set JENKINS_LOCAL_HOSTNAME=%IP%
@echo.
@echo To start the remote firefox container run the following command:
@echo docker run --shm-size=256m -d -p 127.0.0.1:4444:4444 -p 127.0.0.1:5900:5900 -e no_proxy=localhost -e SCREEN_WIDTH=1680 -e SCREEN_HEIGHT=1090 selenium/standalone-firefox-debug:3.141.59
@echo docker run --shm-size=256m -d -p 127.0.0.1:4444:4444 -p 127.0.0.1:5900:5900 -e no_proxy=localhost -e SCREEN_WIDTH=1680 -e SCREEN_HEIGHT=1090 selenium/standalone-firefox-debug:3.141.59

0 comments on commit 2524148

Please sign in to comment.