-
Notifications
You must be signed in to change notification settings - Fork 4
/
provision-tasks-gallery.yaml
67 lines (51 loc) · 2.84 KB
/
provision-tasks-gallery.yaml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# This file is to collect some useful provision tasks as an reference.
# You can just copy tasks from here to build your own configuration file.
# Webidriver Download Sites
## Official
### chromedriver: https://chromedriver.storage.googleapis.com/index.html
### geckodriver: https://github.com/mozilla/geckodriver/releases
### msedgedriver: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
## China Mirror
### chromedriver: https://registry.npmmirror.com/binary.html?path=chromedriver/
### geckodriver: https://repo.huaweicloud.com/geckodriver/
# Useful Tips
## How to install msi without interactive: https://stackoverflow.com/a/8560308/3099733
provision:
tasks:
# auto upgrade selenium-federation (works on Windows and Mac)
## Please use it with pm2 or else your service will be terimated after upgrade.
## To trigger the auto upgrade from remote,
## You need to access http://localhost:4444/termiate to termiate the current service,
## and pm2 will start a new service for you automatically.
- neverSkip: true
cmds:
- npm outdated -g selenium-federation || ( npm install -g selenium-federation && throw_error_to_restart )
# install chrome on mac os using dmg file
- download: https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg
cmds:
- open -W {download_file_path}
- cp -r "/Volumes/Google Chrome/Google Chrome.app" /Applications/
# install chrome on mac os using homebrew
- cmds:
- brew install google-chrome
# download and unzip chromedriver on windows, same for other drivers
# here we suppose command.path should set to ./chromedriver.exe
- download: https://registry.npmmirror.com/-/binary/chromedriver/103.0.5060.24/chromedriver_win32.zip
cmds:
- powershell Expand-Archive {download_file_path} -Force -DestinationPath .
- move /y chromedriver.exe chromedriver-latest.exe # (optional) rename after unzip, but don't forget to change command.path to ./chromedirver-latest.exe
# download and unzip chromedriver on mac osx, same for other drivers
# here we suppose command.path is set to ./chromedriver
- download: https://registry.npmmirror.com/-/binary/chromedriver/103.0.5060.24/chromedriver_mac64.zip
cmds:
- unzip -o {download_file_path}
- mv chromedriver chromedriver-latest # (optional) rename after unzip, but don't forget to change command.path to ./chromedriver-latest
# install 7z on windows
- download: https://www.7-zip.org/a/7z2107-x64.msi
cmds:
- msiexec /i "{download_file_path}" /qn /log 7z-install.log.txt
# download and unzip ffmpeg on windows
# please ensure you already have 7z installed
- download: https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.7z
cmds:
- \"C:\Program Files\7-Zip\7z.exe\" e {download_file_path}