forked from jenkinsci/acceptance-test-harness
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vars.cmd
30 lines (27 loc) · 1.22 KB
/
vars.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
@REM script for setting all the variables in order to run the ATH locally on windows
@REM use config.groovy in the same folder if desired uncomment below
@REM set CONFIG=%~dp0%config.groovy
set DISPLAY=:0
set INTERACTIVE=false
set BROWSER=remote-webdriver-firefox
set REMOTE_WEBDRIVER_URL=http://127.0.0.1:4444/wd/hub
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=3" %%F in ('netsh interface ipv4 show addresses "vEthernet (WSL)" ^| findstr /c:"IP Address:"') DO (
SET IP=%%F
)
FOR /f "tokens=3" %%F in ('netsh interface ipv4 show addresses "vEthernet (WSL (Hyper-V firewall))" ^| 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:4.18.1